Various fixes and stability improvements

This commit is contained in:
Wojtek Figat
2023-12-06 00:28:03 +01:00
parent 38a0718b70
commit fdfca5156b
3 changed files with 10 additions and 3 deletions

View File

@@ -729,7 +729,12 @@ bool ModelData::Pack2ModelHeader(WriteStream* stream) const
// Amount of meshes
const int32 meshes = lod.Meshes.Count();
if (meshes == 0 || meshes > MODEL_MAX_MESHES)
if (meshes == 0)
{
LOG(Warning, "Empty LOD.");
return true;
}
if (meshes > MODEL_MAX_MESHES)
{
LOG(Warning, "Too many meshes per LOD.");
return true;