File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Assets/MRTK/SDK/Features/UX Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1199,7 +1199,7 @@ protected virtual bool ShouldListenToUpDownEvent(InputEventData data)
11991199 int focusingPokePointerCount = 0 ;
12001200 for ( int i = 0 ; i < focusingPointers . Count ; i ++ )
12011201 {
1202- if ( focusingPointers [ i ] . InputSourceParent . SourceId == data . SourceId )
1202+ if ( focusingPointers [ i ] . InputSourceParent != null && focusingPointers [ i ] . InputSourceParent . SourceId == data . SourceId )
12031203 {
12041204 focusingPointerCount ++ ;
12051205 if ( focusingPointers [ i ] is PokePointer )
@@ -1224,7 +1224,9 @@ private bool IsInputFromNearInteraction(InputEventData eventData)
12241224 bool isAnyNearpointerFocusing = false ;
12251225 for ( int i = 0 ; i < focusingPointers . Count ; i ++ )
12261226 {
1227- if ( focusingPointers [ i ] . InputSourceParent . SourceId == eventData . InputSource . SourceId && focusingPointers [ i ] is IMixedRealityNearPointer )
1227+ if ( focusingPointers [ i ] . InputSourceParent != null &&
1228+ focusingPointers [ i ] . InputSourceParent . SourceId == eventData . InputSource . SourceId &&
1229+ focusingPointers [ i ] is IMixedRealityNearPointer )
12281230 {
12291231 isAnyNearpointerFocusing = true ;
12301232 break ;
Original file line number Diff line number Diff line change @@ -330,7 +330,7 @@ public virtual void OnPointerClicked(MixedRealityPointerEventData eventData) { }
330330 /// <inheritdoc />
331331 public virtual void OnPointerUp ( MixedRealityPointerEventData eventData )
332332 {
333- if ( IsPointerValid )
333+ if ( IsPointerValid && eventData . InputSource != null )
334334 {
335335 foreach ( var sourcePointer in eventData . InputSource . Pointers )
336336 {
You can’t perform that action at this time.
0 commit comments