Fix an NRE in ConnectionLogic

This commit is contained in:
abcdefg30
2023-01-26 10:10:42 +01:00
committed by Pavel Penev
parent f5aa2f153a
commit 84add8a03d

View File

@@ -124,7 +124,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
widget.Get<LabelWidget>("CONNECTING_DESC").GetText = () => connectingDescText; widget.Get<LabelWidget>("CONNECTING_DESC").GetText = () => connectingDescText;
var connectionError = widget.Get<LabelWidget>("CONNECTION_ERROR"); var connectionError = widget.Get<LabelWidget>("CONNECTION_ERROR");
var connectionErrorText = modData.Translation.GetString(orderManager.ServerError) ?? connection.ErrorMessage ?? modData.Translation.GetString(UnknownError); var connectionErrorText = orderManager.ServerError != null ? modData.Translation.GetString(orderManager.ServerError) : connection.ErrorMessage ?? modData.Translation.GetString(UnknownError);
connectionError.GetText = () => connectionErrorText; connectionError.GetText = () => connectionErrorText;
var panelTitle = widget.Get<LabelWidget>("TITLE"); var panelTitle = widget.Get<LabelWidget>("TITLE");