SteveDunn/Gleed2D — Issue #18: Application crashes when deleting items with custom properties
Author: tylerrrr07
Created: 2012-02-01 04:03:44+00:00
State: open

Application crashes when deleting items with custom properties. Debugging shows it happens on this line of the DeleteSelectedItems() function of the Model.cs file:

var linkedItem = (LinkedItem)cp.Value;

It looks like it is being assumed that every property can be cast as a LinkedItem type which seems to not be the case. Adding a if (cp.Type == typeof(LinkedItem)) {} check around this block of code through itemsAffected.Add(eachItem) seems to solve the problem on my machine locally.