diff --git a/code/SIBImporter.cpp b/code/SIBImporter.cpp index 62db27f36..586faf15d 100644 --- a/code/SIBImporter.cpp +++ b/code/SIBImporter.cpp @@ -914,10 +914,12 @@ void SIBImporter::InternReadFile(const std::string& pFile, for (size_t n=0;nmChildren[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; + } } }