diff --git a/OpenRA.Mods.RA/Widgets/Delegates/ReplayBrowserDelegate.cs b/OpenRA.Mods.RA/Widgets/Delegates/ReplayBrowserDelegate.cs index 776430bdb8..9eba34d056 100644 --- a/OpenRA.Mods.RA/Widgets/Delegates/ReplayBrowserDelegate.cs +++ b/OpenRA.Mods.RA/Widgets/Delegates/ReplayBrowserDelegate.cs @@ -76,14 +76,22 @@ namespace OpenRA.Mods.RA.Widgets.Delegates currentReplay = value; if (currentReplay != null) { - var summary = new ReplaySummary(currentReplay); - var mapStub = MapStubFromSummary(summary); + try + { + var summary = new ReplaySummary(currentReplay); + var mapStub = MapStubFromSummary(summary); - widget.GetWidget("DURATION").GetText = - () => WidgetUtils.FormatTime(summary.Duration * 3 /* todo: 3:1 ratio isnt always true. */); - widget.GetWidget("MAP_PREVIEW").Map = () => mapStub; - widget.GetWidget("MAP_TITLE").GetText = - () => mapStub != null ? mapStub.Title : "(Unknown Map)"; + widget.GetWidget("DURATION").GetText = + () => WidgetUtils.FormatTime(summary.Duration * 3 /* todo: 3:1 ratio isnt always true. */); + widget.GetWidget("MAP_PREVIEW").Map = () => mapStub; + widget.GetWidget("MAP_TITLE").GetText = + () => mapStub != null ? mapStub.Title : "(Unknown Map)"; + } + catch(Exception e) + { + Log.Write("debug", "Exception while parsing replay: {0}", e.ToString()); + currentReplay = null; + } } } } diff --git a/mods/cnc/chrome/replaybrowser.yaml b/mods/cnc/chrome/replaybrowser.yaml index 7cea44fe86..72baeba2c3 100644 --- a/mods/cnc/chrome/replaybrowser.yaml +++ b/mods/cnc/chrome/replaybrowser.yaml @@ -15,7 +15,7 @@ Background@REPLAYBROWSER_BG: Text:Choose Replay Align:Center Bold:True - ListBox@REPLAY_LIST: + ScrollPanel@REPLAY_LIST: Id:REPLAY_LIST X:20 Y:50