Fix utility commands losing data

This commit is contained in:
Gustas
2025-01-28 20:55:42 +02:00
committed by Paul Chote
parent ad7e5d62cd
commit dd74d3572a

View File

@@ -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)
{