diff --git a/Runtime/SharedResources/Scripts/VRTK3.3.0 UI/VRTK4_UIPointer.cs b/Runtime/SharedResources/Scripts/VRTK3.3.0 UI/VRTK4_UIPointer.cs index 73439b0..9995cb9 100644 --- a/Runtime/SharedResources/Scripts/VRTK3.3.0 UI/VRTK4_UIPointer.cs +++ b/Runtime/SharedResources/Scripts/VRTK3.3.0 UI/VRTK4_UIPointer.cs @@ -405,7 +405,7 @@ internal static VRTK4_UIPointer GetByEventData(PointerEventData eventData) return null; } - + /// /// Please check if event system if VRTK4_EventSystem.IsVRTK4Active() /// @@ -422,7 +422,7 @@ public static VRTK4_UIPointer GetByPointerId(int pointerId) return null; } - if (VrtkUiPointers.Count > pointerId) + if (VrtkUiPointers.Count > pointerId && pointerId >= 0) { return VrtkUiPointers[pointerId]; }