From 2d086fd23627289fc5fecf87ffd0ecb22640be86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raphael=20D=C3=BCmig?= Date: Fri, 25 Oct 2019 15:10:54 +0200 Subject: [PATCH] ColladaParser: fix handling of empty XML-elements --- code/Collada/ColladaParser.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/Collada/ColladaParser.cpp b/code/Collada/ColladaParser.cpp index 646ec473d..fc7ab8c2f 100644 --- a/code/Collada/ColladaParser.cpp +++ b/code/Collada/ColladaParser.cpp @@ -3236,6 +3236,10 @@ void ColladaParser::TestOpening(const char* pName) // Tests for the closing tag of the given element, throws an exception if not found void ColladaParser::TestClosing(const char* pName) { + // check if we have an empty (self-closing) element + if (mReader->isEmptyElement()) + return; + // check if we're already on the closing tag and return right away if (mReader->getNodeType() == irr::io::EXN_ELEMENT_END && strcmp(mReader->getNodeName(), pName) == 0) return;