From c8cdf3009e61eac3c41141075b2eb8cf12889e2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Wed, 1 Dec 2021 12:17:23 +0100 Subject: [PATCH] X3D: replace 'here' debugging printout by an assertion. if mNodeElementCur is NULL, we get a crash anyhow... --- code/AssetLib/X3D/X3DImporter_Macro.hpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/code/AssetLib/X3D/X3DImporter_Macro.hpp b/code/AssetLib/X3D/X3DImporter_Macro.hpp index 6d4c61c3f..a84a739a3 100644 --- a/code/AssetLib/X3D/X3DImporter_Macro.hpp +++ b/code/AssetLib/X3D/X3DImporter_Macro.hpp @@ -60,14 +60,12 @@ namespace Assimp { /// \param [in] pType - type of element to find. /// \param [out] pNE - pointer to found node element. inline X3DNodeElementBase *X3DImporter::MACRO_USE_CHECKANDAPPLY(XmlNode &node, std::string pDEF, std::string pUSE, X3DElemType pType, X3DNodeElementBase *pNE) { - if (nullptr == mNodeElementCur) { - printf("here\n"); - } checkNodeMustBeEmpty(node); if (!pDEF.empty()) Assimp::Throw_DEF_And_USE(node.name()); if (!FindNodeElement(pUSE, pType, &pNE)) Assimp::Throw_USE_NotFound(node.name(), pUSE); + ai_assert(nullptr != mNodeElementCur); mNodeElementCur->Children.push_back(pNE); /* add found object as child to current element */ return pNE;