diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-22 17:52:31 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-22 17:52:31 +0100 |
commit | 5432bad36f789118fe69ae733427d0c7aebd7dcb (patch) | |
tree | a71976af5e2278557d72e1951755ce676b51b96e /scene/resources | |
parent | d9bac56f6f75e119631022fcf83a59a11f5d0b26 (diff) | |
parent | e8d80fc747635a1541fd39be8d6c2a021e7b1794 (diff) |
Merge pull request #69619 from m4gr3d/address_android_editor_crashes_main
Address Android editor crashes
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/mesh.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index cedf4319f8..c93b51552f 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -189,6 +189,7 @@ Ref<TriangleMesh> Mesh::generate_triangle_mesh() const { if (primitive == PRIMITIVE_TRIANGLES) { for (int j = 0; j < ic; j++) { int index = ir[j]; + ERR_FAIL_COND_V(index >= vc, Ref<TriangleMesh>()); facesw[widx++] = vr[index]; } } else { // PRIMITIVE_TRIANGLE_STRIP |