fix crash when import model with option to generate lod and lods amount = 1
This commit is contained in:
@@ -1380,7 +1380,7 @@ bool ModelTool::ImportModel(const String& path, ModelData& meshData, Options& op
|
||||
}
|
||||
|
||||
// Automatic LOD generation
|
||||
if (options.GenerateLODs && data.LODs.HasItems() && options.TriangleReduction < 1.0f - ZeroTolerance)
|
||||
if (options.GenerateLODs && options.LODCount > 1 && data.LODs.HasItems() && options.TriangleReduction < 1.0f - ZeroTolerance)
|
||||
{
|
||||
auto lodStartTime = DateTime::NowUTC();
|
||||
meshopt_setAllocator(MeshOptAllocate, MeshOptDeallocate);
|
||||
|
||||
Reference in New Issue
Block a user