From d1968054b6fcd4ef2efcdec4b633b8b0b216b7ba Mon Sep 17 00:00:00 2001 From: Aaron Carter Date: Mon, 10 Mar 2025 13:37:34 -0500 Subject: [PATCH] IPConnectionWindow.cs - added error case handling in Hide() to prevent exceptions (gives warning and early return). --- Assets/Scripts/Gameplay/UI/IPConnectionWindow.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Gameplay/UI/IPConnectionWindow.cs b/Assets/Scripts/Gameplay/UI/IPConnectionWindow.cs index 8e802727..fc26a1ae 100644 --- a/Assets/Scripts/Gameplay/UI/IPConnectionWindow.cs +++ b/Assets/Scripts/Gameplay/UI/IPConnectionWindow.cs @@ -54,8 +54,11 @@ namespace Unity.BossRoom.Gameplay.UI m_CanvasGroup.blocksRaycasts = true; } - void Hide() - { + void Hide( ) { + if ( !m_CanvasGroup ) { + Debug.LogError( "(!) IPConnectionWindow :: CanvasGroup is not set" ) ; + return ; + } m_CanvasGroup.alpha = 0f; m_CanvasGroup.blocksRaycasts = false; }