fix issue #5641 (segfault after removing redundant materials)

pull/5467/head
Stephen Gold 2024-02-17 00:53:50 -08:00
parent 94bc568d13
commit 740627c6e2
1 changed files with 1 additions and 0 deletions

View File

@ -157,6 +157,7 @@ void RemoveRedundantMatsProcess::Execute( aiScene* pScene) {
// If the new material count differs from the original,
// we need to rebuild the material list and remap mesh material indexes.
if (iNewNum < 1) {
pScene->mNumMaterials = 0;
//throw DeadlyImportError("No materials remaining");
return;
}