Merge pull request #4328 from assimp/kimkulling-x3d_fix_nullptr_exception

Fix nullptr-dereferencing
pull/4318/head^2
Kim Kulling 2022-01-08 11:35:45 +01:00 committed by GitHub
commit b40d9abdb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -264,6 +264,9 @@ void X3DImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
//search for root node element
mNodeElementCur = NodeElement_List.front();
if (mNodeElementCur == nullptr) {
return;
}
while (mNodeElementCur->Parent != nullptr) {
mNodeElementCur = mNodeElementCur->Parent;
}