diff options
author | Fredia Huya-Kouadio <fhuya@meta.com> | 2022-12-04 23:17:06 -0800 |
---|---|---|
committer | Fredia Huya-Kouadio <fhuya@meta.com> | 2022-12-05 10:07:09 -0800 |
commit | e8d80fc747635a1541fd39be8d6c2a021e7b1794 (patch) | |
tree | 9ab19c98e4679880f03a2d072634f98dfeb8b878 | |
parent | f3e6750a7e4702918e05f42b1376e30e652f2f90 (diff) |
Address Android editor crashes
- Add workaround for crash when resuming existing project
-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 a5e7602c8b..ad0cfcceac 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 |