From 84add8a03d1cfea5a967767b9bb421a1c039be69 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Thu, 26 Jan 2023 10:10:42 +0100 Subject: [PATCH] Fix an NRE in ConnectionLogic --- OpenRA.Mods.Common/Widgets/Logic/ConnectionLogic.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Widgets/Logic/ConnectionLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/ConnectionLogic.cs index e866c7836c..2f1f711511 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/ConnectionLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/ConnectionLogic.cs @@ -124,7 +124,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic widget.Get("CONNECTING_DESC").GetText = () => connectingDescText; var connectionError = widget.Get("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; var panelTitle = widget.Get("TITLE");