Don't crash if a replay can't be read.

This commit is contained in:
Paul Chote
2016-09-16 18:30:15 +01:00
parent 634faa31de
commit 099492a52f

View File

@@ -77,7 +77,13 @@ namespace OpenRA.Mods.Common.LoadScreens
// Load a replay directly
if (!string.IsNullOrEmpty(Launch.Replay))
{
var replayMeta = ReplayMetadata.Read(Launch.Replay);
ReplayMetadata replayMeta = null;
try
{
replayMeta = ReplayMetadata.Read(Launch.Replay);
}
catch { }
if (ReplayUtils.PromptConfirmReplayCompatibility(replayMeta, Game.LoadShellMap))
Game.JoinReplay(Launch.Replay);