fix issue #5641 (segfault after removing redundant materials)
parent
94bc568d13
commit
740627c6e2
|
@ -157,6 +157,7 @@ void RemoveRedundantMatsProcess::Execute( aiScene* pScene) {
|
||||||
// If the new material count differs from the original,
|
// If the new material count differs from the original,
|
||||||
// we need to rebuild the material list and remap mesh material indexes.
|
// we need to rebuild the material list and remap mesh material indexes.
|
||||||
if (iNewNum < 1) {
|
if (iNewNum < 1) {
|
||||||
|
pScene->mNumMaterials = 0;
|
||||||
//throw DeadlyImportError("No materials remaining");
|
//throw DeadlyImportError("No materials remaining");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue