iSIBImporter: fix possible dereferncing of a null pointer.

pull/858/head
Kim Kulling 2016-05-15 19:56:29 +02:00
parent 6575696459
commit 1acd24e0ae
1 changed files with 6 additions and 4 deletions

View File

@ -914,10 +914,12 @@ void SIBImporter::InternReadFile(const std::string& pFile,
for (size_t n=0;n<sib.lights.size();n++)
{
aiLight* light = sib.lights[n];
aiNode* node = new aiNode;
root->mChildren[childIdx++] = node;
node->mName = light->mName;
node->mParent = root;
if ( nullptr != light ) {
aiNode* node = new aiNode;
root->mChildren[ childIdx++ ] = node;
node->mName = light->mName;
node->mParent = root;
}
}
}