Fix error on control reorder while it got remove before

This commit is contained in:
2023-03-13 20:06:45 +01:00
parent dea3319b9d
commit d2a0438b71
+1 -1
View File
@@ -264,7 +264,7 @@ namespace FlaxEngine.GUI
internal void ChangeChildIndex(Control child, int newIndex)
{
int oldIndex = _children.IndexOf(child);
if (oldIndex == newIndex)
if (oldIndex == newIndex || oldIndex == -1)
return;
_children.RemoveAt(oldIndex);