Don't allocate empty sheets

This commit is contained in:
Gustas
2025-01-20 13:15:16 +02:00
committed by Paul Chote
parent 87cff1f6f1
commit cd9001e7b9
6 changed files with 19 additions and 7 deletions

View File

@@ -340,7 +340,9 @@ namespace OpenRA
}
// Release the buffer by forcing changes to be written out to the texture, allowing the buffer to be reclaimed by GC.
Game.RunAfterTick(sheetBuilder.Current.ReleaseBuffer);
if (sheetBuilder.Current != null)
Game.RunAfterTick(sheetBuilder.Current.ReleaseBuffer);
Log.Write("debug", "MapCache.LoadAsyncInternal ended");
}