From 69248132add1742de77049cdedf31d0767453b24 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Sat, 4 Sep 2021 11:21:03 +0200 Subject: [PATCH] Don't desync while the world is disposing --- OpenRA.Game/Sync.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenRA.Game/Sync.cs b/OpenRA.Game/Sync.cs index ad16043773..7fc3954d97 100644 --- a/OpenRA.Game/Sync.cs +++ b/OpenRA.Game/Sync.cs @@ -194,7 +194,10 @@ namespace OpenRA finally { inUnsyncedCode = false; - if (sync != world.SyncHash()) + + // When the world is disposing all actors and effects have been removed + // So do not check the hash for a disposing world since it definitively has changed + if (!world.Disposing && sync != world.SyncHash()) throw new InvalidOperationException("RunUnsynced: sync-changing code may not run here"); } }