Skip to content

Commit

Permalink
Fix bug where error messages were spammed when creating a new ViveNav…
Browse files Browse the repository at this point in the history
…Mesh
  • Loading branch information
Flafla2 committed May 23, 2016
1 parent 1325204 commit 0987f26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/Vive-Teleporter/Scripts/ViveNavMeshEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public override void OnInspectorGUI()

ViveNavMesh mesh = (ViveNavMesh)target;

bool HasMesh = mesh.SelectableMesh.vertexCount != 0 || mesh.SelectableMeshBorder.Length != 0;
bool HasMesh = (mesh.SelectableMesh != null && mesh.SelectableMesh.vertexCount != 0) || mesh.SelectableMeshBorder.Length != 0;

if (GUILayout.Button("Update Navmesh Data"))
{
Expand Down

0 comments on commit 0987f26

Please sign in to comment.