From: DrSmugleaf Date: Sun, 14 Jan 2024 03:18:28 +0000 (-0800) Subject: Fix error when switching to a screen without an inventory gui widget (#24059) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=6a7f1b2f1f52a8f88f8770a4c695292e5bebedff;p=space-station-14.git Fix error when switching to a screen without an inventory gui widget (#24059) --- diff --git a/Content.Client/UserInterface/Systems/Inventory/InventoryUIController.cs b/Content.Client/UserInterface/Systems/Inventory/InventoryUIController.cs index b20f926761..5b461c7688 100644 --- a/Content.Client/UserInterface/Systems/Inventory/InventoryUIController.cs +++ b/Content.Client/UserInterface/Systems/Inventory/InventoryUIController.cs @@ -57,8 +57,8 @@ public sealed class InventoryUIController : UIController, IOnStateEntered(); - RegisterInventoryButton(inventoryGui.InventoryButton); + if (UIManager.GetActiveUIWidgetOrNull() is { } inventoryGui) + RegisterInventoryButton(inventoryGui.InventoryButton); } public void OnStateEntered(GameplayState state)