From e8d80fc747635a1541fd39be8d6c2a021e7b1794 Mon Sep 17 00:00:00 2001 From: Fredia Huya-Kouadio Date: Sun, 4 Dec 2022 23:17:06 -0800 Subject: Address Android editor crashes - Add workaround for crash when resuming existing project --- scene/resources/mesh.cpp | 1 + 1 file changed, 1 insertion(+) 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 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()); facesw[widx++] = vr[index]; } } else { // PRIMITIVE_TRIANGLE_STRIP -- cgit v1.2.3