From 8835f620e9d9c766e0e86e8a3e4efeb240d7ecb4 Mon Sep 17 00:00:00 2001 From: Hubert Mattusch Date: Fri, 15 Sep 2023 14:01:24 +0200 Subject: [PATCH] null check --- NEG/UI/UnityUi/MonoUiInputManger.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEG/UI/UnityUi/MonoUiInputManger.cs b/NEG/UI/UnityUi/MonoUiInputManger.cs index 4f87f94..de79046 100644 --- a/NEG/UI/UnityUi/MonoUiInputManger.cs +++ b/NEG/UI/UnityUi/MonoUiInputManger.cs @@ -57,7 +57,7 @@ namespace NEG.UI.UnityUi { CurrentSelectionSource = SelectionSource.Direction; Cursor.visible = false; - if (EventSystem.current.currentSelectedGameObject == null) + if (EventSystem.current != null && EventSystem.current.currentSelectedGameObject == null) { EventSystem.current.SetSelectedGameObject(((MonoWindow)MonoUiManager.Instance.CurrentMainWindow).DefaultSelectedItem); return;