From fd46b3864a3a35f4115b690b66ca96e117b348d4 Mon Sep 17 00:00:00 2001 From: _nebula <41904486+misternebula@users.noreply.github.com> Date: Sun, 22 Jan 2023 19:49:46 +0000 Subject: [PATCH] fix nres in debuggui --- QSB/Utility/DebugGUI.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/QSB/Utility/DebugGUI.cs b/QSB/Utility/DebugGUI.cs index 995236e5..aa034073 100644 --- a/QSB/Utility/DebugGUI.cs +++ b/QSB/Utility/DebugGUI.cs @@ -136,8 +136,17 @@ internal class DebugGUI : MonoBehaviour, IAddComponentOnStart } WriteLine(1, $"Selected WorldObject : {(DebugActions.WorldObjectSelection == null ? "All" : DebugActions.WorldObjectSelection.Name)}"); - WriteLine(1, $"Invincible : {Locator.GetDeathManager()._invincible}"); - WriteLine(1, $"Tool Mode : {Locator.GetToolModeSwapper().GetToolMode()}"); + + if (Locator.GetDeathManager() != null) + { + WriteLine(1, $"Invincible : {Locator.GetDeathManager()._invincible}"); + } + + if (Locator.GetToolModeSwapper() != null) + { + WriteLine(1, $"Tool Mode : {Locator.GetToolModeSwapper().GetToolMode()}"); + } + WriteLine(1, $"Input Mode Stack :"); foreach (var item in OWInput.GetInputModeStack()) { @@ -158,7 +167,7 @@ internal class DebugGUI : MonoBehaviour, IAddComponentOnStart WriteLine(2, $"Dead : {player.IsDead}"); WriteLine(2, $"Ready : {player.IsReady}"); WriteLine(2, $"Suited Up : {player.SuitedUp}"); - WriteLine(2, $"In Suited Up State : {player.AnimationSync.InSuitedUpState}"); + WriteLine(2, $"In Suited Up State : {player.AnimationSync?.InSuitedUpState}"); WriteLine(2, $"InDreamWorld : {player.InDreamWorld}"); if (player.IsReady && QSBWorldSync.AllObjectsReady)