Fix utility commands losing data
This commit is contained in:
@@ -149,6 +149,10 @@ namespace OpenRA.Graphics
|
|||||||
var buffer = data;
|
var buffer = data;
|
||||||
ReleaseBuffer();
|
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.
|
// Only transfer if the destination has no data that would be lost by overwriting.
|
||||||
if (buffer != null && destination.data == null && destination.texture == null)
|
if (buffer != null && destination.data == null && destination.texture == null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user