diff options
author | sps1112 <sidps1112@gmail.com> | 2021-03-03 15:59:30 +0530 |
---|---|---|
committer | sps1112 <sidps1112@gmail.com> | 2021-03-03 15:59:30 +0530 |
commit | cf6bfea93ff2a1e2b166de07bc8a0625230f3cad (patch) | |
tree | e945b933ed8b5431fd9da9c7506ac0b4cc842139 /scene/resources | |
parent | 4d1f83a621a03a42a6ab7765084db84aab32256f (diff) |
Add null check for NavigationMesh.create_from_mesh()
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/navigation_mesh.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/resources/navigation_mesh.cpp b/scene/resources/navigation_mesh.cpp index 84f3c23f77..8c12f59a00 100644 --- a/scene/resources/navigation_mesh.cpp +++ b/scene/resources/navigation_mesh.cpp @@ -31,6 +31,8 @@ #include "navigation_mesh.h" void NavigationMesh::create_from_mesh(const Ref<Mesh> &p_mesh) { + ERR_FAIL_COND(p_mesh.is_null()); + vertices = Vector<Vector3>(); clear_polygons(); |