diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-03-02 11:10:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-02 11:10:29 +0100 |
commit | 4ccc8e57f98024b913bafbf290b4093658674e68 (patch) | |
tree | 80392713d82908fbe890cf0ed6d838e268374fe7 /scene/3d | |
parent | 3bddce7e3d79946b16216fe42661c229563219ca (diff) | |
parent | 555eebf3f4845c8138c24ded96fcb3fa5c67787a (diff) |
Merge pull request #17171 from hpvb/fix-17153
Don't crash when trying to add an invalid navmesh
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/navigation.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/3d/navigation.cpp b/scene/3d/navigation.cpp index e7ab6cde8a..77bf703706 100644 --- a/scene/3d/navigation.cpp +++ b/scene/3d/navigation.cpp @@ -35,6 +35,7 @@ void Navigation::_navmesh_link(int p_id) { ERR_FAIL_COND(!navmesh_map.has(p_id)); NavMesh &nm = navmesh_map[p_id]; ERR_FAIL_COND(nm.linked); + ERR_FAIL_COND(nm.navmesh.is_null()); PoolVector<Vector3> vertices = nm.navmesh->get_vertices(); int len = vertices.size(); |