diff options
Diffstat (limited to 'Build/source/texk/dvisvgm/dvisvgm-src/src/XMLDocument.cpp')
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-src/src/XMLDocument.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLDocument.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLDocument.cpp index b2131b5f3f9..33ad5f645ef 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLDocument.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLDocument.cpp @@ -19,7 +19,6 @@ *************************************************************************/ #include <config.h> -#include "macros.h" #include "XMLDocument.h" using namespace std; @@ -47,8 +46,8 @@ void XMLDocument::clear () { void XMLDocument::append (XMLNode *node) { if (!node) return; - XMLElementNode *newRoot = dynamic_cast<XMLElementNode*>(node); - if (newRoot) { // there can only be one root element node in the document + if (XMLElementNode *newRoot = dynamic_cast<XMLElementNode*>(node)) { + // there can only be one root element node in the document delete _rootElement; // so if there is already one... _rootElement = newRoot; // ...we replace it } |