Skip to content

Commit

Permalink
fix(Pointer): prevent crash when closing steam menu
Browse files Browse the repository at this point in the history
There was an issue where the boundary renderers would not be
available when the Steam in game menu was activated because
the mesh would be recreated when the game menu was closed.
  • Loading branch information
thestonefox committed Jun 22, 2017
1 parent 1d9e11c commit 2b5280c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Assets/VRTK/Scripts/Pointers/VRTK_PlayAreaCursor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,10 @@ public virtual void ToggleVisibility(bool state)

for (int i = 0; i < boundaryRenderers.Length; i++)
{
boundaryRenderers[i].enabled = state;
if (boundaryRenderers[i] != null)
{
boundaryRenderers[i].enabled = state;
}
}
}

Expand Down

0 comments on commit 2b5280c

Please sign in to comment.