- fixed issue #122

This commit is contained in:
SoftCoder 2016-10-30 09:21:34 -07:00
parent 7a64569938
commit b180da5e3d
2 changed files with 10 additions and 0 deletions

View File

@ -165,6 +165,15 @@ Object *Gui::getHighlightedResourceObject() const{
return NULL;
}
else {
if(world == NULL) {
throw megaglest_runtime_error("world == NULL");
}
if(world->getMap() == NULL) {
throw megaglest_runtime_error("world->getMap() == NULL");
}
if(world->getMap()->getSurfaceCell(highlightedResourceObjectPos) == NULL) {
throw megaglest_runtime_error("world->getMap()->getSurfaceCell(highlightedResourceObjectPos) == NULL");
}
return world->getMap()->getSurfaceCell(highlightedResourceObjectPos)->getObject();
}
}

View File

@ -4912,6 +4912,7 @@ void MenuStateCustomGame::processScenario() {
setupTechList("", false);
reloadFactions(false,"");
setupTilesetList("");
updateControlers();
}
SetupUIForScenarios();
}