Skip to content

Commit

Permalink
Renderer: Dispose worldBuffer only when it was initialized.
Browse files Browse the repository at this point in the history
  • Loading branch information
LipkeGu authored and PunkPun committed Feb 6, 2024
1 parent 4e031a6 commit 4077f28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OpenRA.Game/Renderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ public void SaveScreenshot(string path)

public void Dispose()
{
worldBuffer.Dispose();
worldBuffer?.Dispose();
screenBuffer.Dispose();
worldBufferSnapshot.Dispose();
tempVertexBuffer.Dispose();
Expand Down

0 comments on commit 4077f28

Please sign in to comment.