diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-03-03 17:01:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-03 17:01:35 +0100 |
commit | 864caf571164dea655a7c1f9d9b423195653dee2 (patch) | |
tree | 89640ee95993788433294e4db0d723b20e36517a /scene | |
parent | f3e98c286ae1b4b401e5e22c6b07bc61d0c5ea48 (diff) | |
parent | cf6bfea93ff2a1e2b166de07bc8a0625230f3cad (diff) |
Merge pull request #46617 from sps1112/fix-navigationmesh-crash
Add null check in NavigationMesh.new().create_from_mesh(BoxShape.new())
Diffstat (limited to 'scene')
-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(); |