Visual Mode: fixed an issue where deleting a thing could cause a crash. Fixes #730

This commit is contained in:
biwa 2022-05-07 18:49:36 +02:00
parent 44a2a0daae
commit ccdbc28ed8

View file

@ -3851,7 +3851,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
foreach (IVisualEventReceiver i in objs)
{
if (i is BaseVisualThing)
{
visiblethings.Remove((BaseVisualThing)i); // [ZZ] if any
allthings.Remove(((BaseVisualThing)i).Thing);
}
i.OnDelete();
}
PostAction();