Properly save replay even when the game crashes (fixes #5610)
This commit is contained in:
@@ -483,6 +483,8 @@ namespace OpenRA
|
||||
|
||||
SetIdealFrameTime(Settings.Graphics.MaxFramerate);
|
||||
|
||||
try
|
||||
{
|
||||
while (state == RunStatus.Running)
|
||||
{
|
||||
if (Settings.Graphics.CapFramerate)
|
||||
@@ -498,10 +500,13 @@ namespace OpenRA
|
||||
else
|
||||
Tick(orderManager);
|
||||
}
|
||||
|
||||
}
|
||||
finally
|
||||
{
|
||||
// Ensure that the active replay is properly saved
|
||||
if (orderManager != null)
|
||||
orderManager.Dispose();
|
||||
}
|
||||
|
||||
Renderer.Device.Dispose();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user