Fix for "collection was modified" exceptions when removing entities using delete or Ctrl+X

This commit is contained in:
Regalis
2016-12-12 15:01:50 +02:00
parent f9ea876edf
commit 6a189c6ec4

View File

@@ -348,7 +348,7 @@ namespace Barotrauma
if (selectedList.Contains(this))
{
selectedList.Remove(this);
selectedList = selectedList.FindAll(e => e != this);
}
if (aiTarget != null) aiTarget.Remove();