From 0ea4bb10a1d4d44e2fa0d674b29bf7ce17a17d73 Mon Sep 17 00:00:00 2001 From: Gustas <37534529+PunkPun@users.noreply.github.com> Date: Tue, 28 Jan 2025 20:55:42 +0200 Subject: [PATCH] Fix utility commands losing data --- OpenRA.Game/Graphics/Sheet.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenRA.Game/Graphics/Sheet.cs b/OpenRA.Game/Graphics/Sheet.cs index 2de2d1ce81..2d72fe7c06 100644 --- a/OpenRA.Game/Graphics/Sheet.cs +++ b/OpenRA.Game/Graphics/Sheet.cs @@ -149,6 +149,10 @@ namespace OpenRA.Graphics var buffer = data; ReleaseBuffer(); + // We aren't commiting data to the GPU, so let's not delete our data. + if (Game.Renderer == null) + return false; + // Only transfer if the destination has no data that would be lost by overwriting. if (buffer != null && destination.data == null && destination.texture == null) {