Dispose renderer and sound on exception.

This commit is contained in:
Matthias Mailänder
2016-08-07 17:23:18 +02:00
parent 0ec19365e3
commit a8118d9acd

View File

@@ -279,6 +279,12 @@ namespace OpenRA
{
Log.Write("graphics", "{0}", e);
Console.WriteLine("Renderer initialization failed. Check graphics.log for details.");
if (Renderer != null)
Renderer.Dispose();
if (Sound != null)
Sound.Dispose();
}
}