Skip to content

Commit

Permalink
fix(SnapDropZone): Highlight Null Check
Browse files Browse the repository at this point in the history
Null check added to surpress NRE
  • Loading branch information
JWNJWN committed May 18, 2018
1 parent 664540f commit 2a40613
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Assets/VRTK/Prefabs/SnapDropZone/VRTK_SnapDropZone.cs
Original file line number Diff line number Diff line change
Expand Up @@ -785,10 +785,13 @@ protected virtual IEnumerator UpdateTransformDimensions(VRTK_InteractableObject
yield return null;
}

//Force all to the last setting in case anything has moved during the transition
ioTransform.position = endSettings.transform.position;
ioTransform.rotation = endSettings.transform.rotation;
ioTransform.localScale = endScale;
if (ioTransform != null && endSettings != null)
{
//Force all to the last setting in case anything has moved during the transition
ioTransform.position = endSettings.transform.position;
ioTransform.rotation = endSettings.transform.rotation;
ioTransform.localScale = endScale;
}

ioCheck.isKinematic = storedKinematicState;
SetDropSnapType(ioCheck);
Expand Down

0 comments on commit 2a40613

Please sign in to comment.