summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-22 17:52:31 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-22 17:52:31 +0100
commit5432bad36f789118fe69ae733427d0c7aebd7dcb (patch)
treea71976af5e2278557d72e1951755ce676b51b96e /scene/resources
parentd9bac56f6f75e119631022fcf83a59a11f5d0b26 (diff)
parente8d80fc747635a1541fd39be8d6c2a021e7b1794 (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.cpp1
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