Merge pull request #69619 from m4gr3d/address_android_editor_crashes_main

Address Android editor crashes
This commit is contained in:
Rémi Verschelde 2023-01-22 17:52:31 +01:00
commit 5432bad36f
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -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