diff --git a/OpenRA.Game/Graphics/Sheet.cs b/OpenRA.Game/Graphics/Sheet.cs index e2d2874962..bf6f6e6e50 100644 --- a/OpenRA.Game/Graphics/Sheet.cs +++ b/OpenRA.Game/Graphics/Sheet.cs @@ -154,16 +154,6 @@ namespace OpenRA.Graphics } public void CommitData() - { - CommitData(false); - } - - public void ReleaseBuffer() - { - CommitData(true); - } - - void CommitData(bool releaseBuffer) { lock (textureLock) { @@ -174,8 +164,17 @@ namespace OpenRA.Graphics "If you need to make only small changes to the texture data consider creating a buffered sheet instead."); dirty = true; - if (releaseBuffer) - releaseBufferOnCommit = true; + } + } + + public void ReleaseBuffer() + { + lock (textureLock) + { + if (!Buffered) + return; + dirty = true; + releaseBufferOnCommit = true; } }