From 41c9944c41e54a3b6b7727b5a60868bebf95a3a5 Mon Sep 17 00:00:00 2001 From: FL-OZ <58238103+FL-OZ@users.noreply.github.com> Date: Fri, 5 Jun 2020 16:58:00 -0500 Subject: [PATCH] Fix pda crash from code being outside if statement (#1079) Co-authored-by: FL-OZ --- .../GameObjects/Components/PDA/PDABoundUserInterface.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Content.Client/GameObjects/Components/PDA/PDABoundUserInterface.cs b/Content.Client/GameObjects/Components/PDA/PDABoundUserInterface.cs index 062fd7feea..1c724bceee 100644 --- a/Content.Client/GameObjects/Components/PDA/PDABoundUserInterface.cs +++ b/Content.Client/GameObjects/Components/PDA/PDABoundUserInterface.cs @@ -111,6 +111,10 @@ namespace Content.Client.GameObjects.Components.PDA if (msg.Account != null) { _menu.CurrentLoggedInAccount = msg.Account; + var balance = msg.Account.DataBalance; + var weightedColor = GetWeightedColorString(balance); + _menu.BalanceInfo.SetMarkup(Loc.GetString("TC Balance: [color={0}]{1}[/color]", weightedColor, balance)); + } if (msg.Listings != null) @@ -121,10 +125,6 @@ namespace Content.Client.GameObjects.Components.PDA _menu.AddListingGui(item); } } - - var balance = _menu.CurrentLoggedInAccount.DataBalance; - var weightedColor = GetWeightedColorString(balance); - _menu.BalanceInfo.SetMarkup(Loc.GetString("TC Balance: [color={0}]{1}[/color]", weightedColor, balance)); _menu.MasterTabContainer.SetTabVisible(1, msg.Account != null); break; }