Merge pull request #8330 from Mailaender/gametimer-nre
Fixed a NullReferenceException in GameTimeLogic
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user