Merge pull request #8330 from Mailaender/gametimer-nre

Fixed a NullReferenceException in GameTimeLogic
This commit is contained in:
Pavel Penev
2015-06-01 01:59:32 +03:00

View File

@@ -61,7 +61,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var connection = orderManager.Connection as ReplayConnection; var connection = orderManager.Connection as ReplayConnection;
if (connection != null && connection.TickCount != 0) if (connection != null && connection.TickCount != 0)
percentage.GetText = () => "({0}%)".F(orderManager.NetFrameNumber * 100 / connection.TickCount); percentage.GetText = () => "({0}%)".F(orderManager.NetFrameNumber * 100 / connection.TickCount);
else else if (timer != null)
timer.Bounds.Width += percentage.Bounds.Width; timer.Bounds.Width += percentage.Bounds.Width;
} }
} }