RemoveRedundantMaterials: Add assertion to silence a static analyzer warning

This commit is contained in:
Turo Lamminen
2017-11-15 11:45:21 +02:00
parent 95f2319b41
commit c51b92cfa3
+1
View File
@@ -171,6 +171,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 != pScene->mNumMaterials) {
ai_assert(iNewNum > 0);
aiMaterial** ppcMaterials = new aiMaterial*[iNewNum];
::memset(ppcMaterials,0,sizeof(void*)*iNewNum);
for (unsigned int p = 0; p < pScene->mNumMaterials;++p)