mirror of
https://github.com/godotengine/godot.git
synced 2024-11-26 22:23:04 +00:00
Fix crash when importing small GLTF mesh
This commit is contained in:
parent
c944c9e572
commit
dd9ba6de9f
@ -287,7 +287,7 @@ void ImporterMesh::generate_lods(float p_normal_merge_angle, float p_normal_spli
|
||||
const int *indices_ptr = indices.ptr();
|
||||
|
||||
if (normals.is_empty()) {
|
||||
normals.resize(vertices.size());
|
||||
normals.resize(index_count);
|
||||
Vector3 *n_ptr = normals.ptrw();
|
||||
for (unsigned int j = 0; j < index_count; j += 3) {
|
||||
const Vector3 &v0 = vertices_ptr[indices_ptr[j + 0]];
|
||||
|
Loading…
Reference in New Issue
Block a user