Skip to content

Commit

Permalink
Don't re-write entire map_meta.txt if a setting is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
kwolekr committed Apr 6, 2013
1 parent 046534e commit 453d79e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/map.cpp
Expand Up @@ -3466,8 +3466,16 @@ void ServerMap::loadMapMeta()
break;
params.parseConfigLine(line);
}

MapgenParams *mgparams = m_emerge->getParamsFromSettings(&params);

MapgenParams *mgparams;
try {
mgparams = m_emerge->getParamsFromSettings(&params);
} catch (SettingNotFoundException &e) {
infostream << "Couldn't get a setting from map_meta.txt: "
<< e.what() << std::endl;
mgparams = NULL;
}

if (mgparams) {
if (m_mgparams)
delete m_mgparams;
Expand Down

0 comments on commit 453d79e

Please sign in to comment.