Fixed collection modification inside foreach. (reported by Lud)
This commit is contained in:
parent
2953dc8715
commit
1b552471e0
|
@ -804,9 +804,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
//Remove all vertex handles from selection
|
||||
if(vertices != null && vertices.Count > 0)
|
||||
{
|
||||
foreach(IVisualEventReceiver i in selectedobjects)
|
||||
for (int i = 0; i < selectedobjects.Count; i++)
|
||||
{
|
||||
if(i is BaseVisualVertex) RemoveSelectedObject(i);
|
||||
if (selectedobjects[i] is BaseVisualVertex)
|
||||
{
|
||||
RemoveSelectedObject(selectedobjects[i]);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue