mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
[4.3] ImporterMesh: Validate triangle indices array size is a mult of 3
This commit is contained in:
@@ -307,6 +307,7 @@ void ImporterMesh::generate_lods(float p_normal_merge_angle, float p_normal_spli
|
||||
if (index_count == 0) {
|
||||
continue; //no lods if no indices
|
||||
}
|
||||
ERR_FAIL_COND_MSG(index_count % 3 != 0, "ImporterMesh::generate_lods: Indexed triangle meshes MUST have an index array with a size that is a multiple of 3, but got " + itos(index_count) + " indices. Cannot generate LODs for this invalid mesh.");
|
||||
|
||||
const Vector3 *vertices_ptr = vertices.ptr();
|
||||
const int *indices_ptr = indices.ptr();
|
||||
|
||||
Reference in New Issue
Block a user