From 1acd24e0ae86a72764151ddbc685a0a5715c9cdb Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sun, 15 May 2016 19:56:29 +0200 Subject: [PATCH] iSIBImporter: fix possible dereferncing of a null pointer. --- code/SIBImporter.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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; + } } }