Fix error when switching to a screen without an inventory gui widget (#24059)
This commit is contained in:
@@ -57,7 +57,7 @@ public sealed class InventoryUIController : UIController, IOnStateEntered<Gamepl
|
|||||||
if (UIManager.ActiveScreen == null)
|
if (UIManager.ActiveScreen == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var inventoryGui = UIManager.GetActiveUIWidget<InventoryGui>();
|
if (UIManager.GetActiveUIWidgetOrNull<InventoryGui>() is { } inventoryGui)
|
||||||
RegisterInventoryButton(inventoryGui.InventoryButton);
|
RegisterInventoryButton(inventoryGui.InventoryButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user