diff --git a/source/shared_lib/sources/xml/xml_parser.cpp b/source/shared_lib/sources/xml/xml_parser.cpp index d0a422c15..7c53181d4 100644 --- a/source/shared_lib/sources/xml/xml_parser.cpp +++ b/source/shared_lib/sources/xml/xml_parser.cpp @@ -465,18 +465,19 @@ void XmlIoRapid::save(const string &path, const XmlNode *node){ // ===================================================== XmlTree::XmlTree(xml_engine_parser_type engine_type) { rootNode= NULL; - this->engine_type = engine_type; - this->skipStackCheck = false; - switch(this->engine_type) { + switch(engine_type) { case XML_XERCES_ENGINE: break; case XML_RAPIDXML_ENGINE: break; default: - throw megaglest_runtime_error("Invalid XML parser engine: " + intToStr(this->engine_type)); + throw megaglest_runtime_error("Invalid XML parser engine: " + intToStr(engine_type)); } + + this->engine_type = engine_type; + this->skipStackCheck = false; } void XmlTree::init(const string &name){