mirror of
https://github.com/minetest/minetest.git
synced 2025-03-06 20:48:40 +01:00
Fix crash when processing empty mesh buffers
This commit is contained in:
parent
ff87be6e5f
commit
5109fa7eda
1 changed files with 2 additions and 0 deletions
|
@ -337,6 +337,8 @@ bool checkMeshNormals(scene::IMesh *mesh)
|
|||
|
||||
for (u32 i = 0; i < buffer_count; i++) {
|
||||
scene::IMeshBuffer *buffer = mesh->getMeshBuffer(i);
|
||||
if (!buffer->getVertexCount())
|
||||
continue;
|
||||
|
||||
// Here we intentionally check only first normal, assuming that if buffer
|
||||
// has it valid, then most likely all other ones are fine too. We can
|
||||
|
|
Loading…
Add table
Reference in a new issue