debug tweak; extra null check on EventSystem.current

This commit is contained in:
Tyfon
2024-06-22 03:31:31 -07:00
parent 376999a472
commit ab23705cdb
2 changed files with 3 additions and 5 deletions

View File

@@ -29,7 +29,7 @@ namespace UIFixes
{
// Need an item context to operate on, and ignore these keypresses if there's a focused textbox somewhere
ItemContextAbstractClass itemContext = __instance.R().ItemContext;
if (itemContext == null || EventSystem.current.currentSelectedGameObject?.GetComponent<TMP_InputField>() != null)
if (itemContext == null || EventSystem.current?.currentSelectedGameObject?.GetComponent<TMP_InputField>() != null)
{
return;
}