Kim Kulling 2023-12-21 20:54:49 +01:00
parent df33d33e8f
commit 7b54b0f406
1 changed files with 4 additions and 1 deletions

View File

@ -1234,7 +1234,10 @@ void IRRImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
// Parse the XML
// Find the scene root from document root.
const pugi::xml_node &sceneRoot = documentRoot.child("irr_scene");
if (!sceneRoot) throw new DeadlyImportError("IRR: <irr_scene> not found in file");
if (!sceneRoot) {
delete root;
throw new DeadlyImportError("IRR: <irr_scene> not found in file");
}
for (pugi::xml_node &child : sceneRoot.children()) {
// XML elements are either nodes, animators, attributes, or materials
if (!ASSIMP_stricmp(child.name(), "node")) {