diff --git a/source/glest_game/menu/menu_state_custom_game.cpp b/source/glest_game/menu/menu_state_custom_game.cpp index 9016d8df0..a23d8e4ba 100644 --- a/source/glest_game/menu/menu_state_custom_game.cpp +++ b/source/glest_game/menu/menu_state_custom_game.cpp @@ -2441,7 +2441,9 @@ void MenuStateCustomGame::update() { if(this->autoloadScenarioName != "") { listBoxScenario.setSelectedItem(formatString(this->autoloadScenarioName),false); lastSetChangedGameSettings = time(NULL); - lastGameSettingsreceivedCount=serverInterface->getGameSettingsUpdateCount(); + if(serverInterface != NULL){ + lastGameSettingsreceivedCount=serverInterface->getGameSettingsUpdateCount(); + } if(listBoxScenario.getSelectedItem() != formatString(this->autoloadScenarioName)) { mainMessageBoxState=1; showMessageBox( "Could not find scenario name: " + formatString(this->autoloadScenarioName), "Scenario Missing", false); diff --git a/source/shared_lib/sources/xml/xml_parser.cpp b/source/shared_lib/sources/xml/xml_parser.cpp index ca71d0bb9..47cfad3f8 100644 --- a/source/shared_lib/sources/xml/xml_parser.cpp +++ b/source/shared_lib/sources/xml/xml_parser.cpp @@ -705,15 +705,15 @@ XmlNode::XmlNode(xml_node<> *node, const std::map &mapTagReplacem if(node->type() == node_element && children.size() == 0) { string xmlText = node->value(); - bool debugReplace = false; +// bool debugReplace = false; // if(xmlText.find("{SCENARIOPATH}") != string::npos) { // printf("\n----------------------\n** XML!! WILL REPLACE [%s]\n",xmlText.c_str()); // debugReplace = true; // } Properties::applyTagsToValue(xmlText,&mapTagReplacementValues, skipUpdatePathClimbingParts); - if(debugReplace) { - printf("\n\n** XML!! REPLACED WITH [%s]\n===================\n",xmlText.c_str()); - } +// if(debugReplace) { +// printf("\n\n** XML!! REPLACED WITH [%s]\n===================\n",xmlText.c_str()); +// } text = xmlText; } }