X3D: replace 'here' debugging printout by an assertion.
if mNodeElementCur is NULL, we get a crash anyhow...pull/4217/head
parent
23d7811276
commit
c8cdf3009e
|
@ -60,14 +60,12 @@ namespace Assimp {
|
||||||
/// \param [in] pType - type of element to find.
|
/// \param [in] pType - type of element to find.
|
||||||
/// \param [out] pNE - pointer to found node element.
|
/// \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) {
|
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);
|
checkNodeMustBeEmpty(node);
|
||||||
if (!pDEF.empty())
|
if (!pDEF.empty())
|
||||||
Assimp::Throw_DEF_And_USE(node.name());
|
Assimp::Throw_DEF_And_USE(node.name());
|
||||||
if (!FindNodeElement(pUSE, pType, &pNE))
|
if (!FindNodeElement(pUSE, pType, &pNE))
|
||||||
Assimp::Throw_USE_NotFound(node.name(), pUSE);
|
Assimp::Throw_USE_NotFound(node.name(), pUSE);
|
||||||
|
ai_assert(nullptr != mNodeElementCur);
|
||||||
mNodeElementCur->Children.push_back(pNE); /* add found object as child to current element */
|
mNodeElementCur->Children.push_back(pNE); /* add found object as child to current element */
|
||||||
|
|
||||||
return pNE;
|
return pNE;
|
||||||
|
|
Loading…
Reference in New Issue