Skip to content

Commit a8118d9

Browse files
committed
Dispose renderer and sound on exception.
1 parent 0ec1936 commit a8118d9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

OpenRA.Game/Game.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,12 @@ internal static void Initialize(Arguments args)
279279
{
280280
Log.Write("graphics", "{0}", e);
281281
Console.WriteLine("Renderer initialization failed. Check graphics.log for details.");
282+
283+
if (Renderer != null)
284+
Renderer.Dispose();
285+
286+
if (Sound != null)
287+
Sound.Dispose();
282288
}
283289
}
284290

0 commit comments

Comments
 (0)