From 56fa1ab0e371b95320c9f8298c916d52c28450fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sun, 18 Sep 2016 17:43:22 +0200 Subject: [PATCH] Fix a crash when no sync report is available. --- OpenRA.Game/Network/SyncReport.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRA.Game/Network/SyncReport.cs b/OpenRA.Game/Network/SyncReport.cs index d408f5c16f..ccbe5b9625 100644 --- a/OpenRA.Game/Network/SyncReport.cs +++ b/OpenRA.Game/Network/SyncReport.cs @@ -92,12 +92,13 @@ namespace OpenRA.Network internal void DumpSyncReport(int frame, IEnumerable orders) { + Log.AddChannel("sync", "syncreport.log"); + foreach (var r in syncReports) { if (r.Frame == frame) { var mod = Game.ModData.Manifest.Metadata; - Log.AddChannel("sync", "syncreport.log"); Log.Write("sync", "Player: {0} ({1} {2} {3})", Game.Settings.Player.Name, Platform.CurrentPlatform, Environment.OSVersion, Platform.RuntimeVersion); Log.Write("sync", "Game ID: {0} (Mod: {1} at Version {2})", orderManager.LobbyInfo.GlobalSettings.GameUid, mod.Title, mod.Version); Log.Write("sync", "Sync for net frame {0} -------------", r.Frame);