diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-10-01 11:29:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-01 11:29:19 +0200 |
commit | 6ed3e9c182627385bf7e249bf770e845d0b949d8 (patch) | |
tree | 02b75f6d38b31649e3cccbe3dcc50cef2beabcd0 /scene/resources | |
parent | 8be97e3b51f5adbee0f9f5d3193da53680a44695 (diff) | |
parent | 82f7f2c46c023629042d16ada5d5085bd29bb9ad (diff) |
Merge pull request #53208 from timothyqiu/headless-crash
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 d0e0f15ef6..d87056f55d 100644 --- a/scene/resources/navigation_mesh.cpp +++ b/scene/resources/navigation_mesh.cpp @@ -41,6 +41,8 @@ void NavigationMesh::create_from_mesh(const Ref<Mesh> &p_mesh) { continue; } Array arr = p_mesh->surface_get_arrays(i); + ERR_CONTINUE(arr.size() != Mesh::ARRAY_MAX); + Vector<Vector3> varr = arr[Mesh::ARRAY_VERTEX]; Vector<int> iarr = arr[Mesh::ARRAY_INDEX]; if (varr.size() == 0 || iarr.size() == 0) { |