Reset Unsorted flag only after sorting has been fully finished

This not only seems more correct but might also fix #711
scancodes-fix
Armin Burgmeier 2012-02-05 17:28:55 +01:00
parent fd4540d573
commit fb27b9c1c3
1 changed files with 1 additions and 1 deletions

View File

@ -482,13 +482,13 @@ void C4GameObjects::ResortUnsorted()
{
// readd to main object list
Remove(cObj);
cObj->Unsorted=false;
if (!Add(cObj))
{
// readd failed: Better kill object to prevent leaking...
Game.ClearPointers(cObj);
delete cObj;
}
cObj->Unsorted=false;
}
}
}