Fix shellmap OrderManager use after dispose.

This commit is contained in:
Paul Chote
2021-08-25 12:38:10 +01:00
committed by abcdefg30
parent 8f412f869d
commit e0e219793f
4 changed files with 36 additions and 18 deletions

View File

@@ -574,6 +574,12 @@ namespace OpenRA
while (frameEndActions.Count != 0)
frameEndActions.Dequeue()(this);
// HACK: The shellmap OrderManager is owned by its world in order to avoid
// problems with having multiple OMs active when joining a game lobby from the main menu.
// A matching check in Game.JoinInner handles OM disposal for all other cases.
if (Type == WorldType.Shellmap)
OrderManager.Dispose();
Game.FinishBenchmark();
}
}