Skip to content

Commit 453d79e

Browse files
committedApr 6, 2013
Don't re-write entire map_meta.txt if a setting is missing
1 parent 046534e commit 453d79e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed
 

‎src/map.cpp

+10-2
Original file line numberDiff line numberDiff line change
@@ -3466,8 +3466,16 @@ void ServerMap::loadMapMeta()
34663466
break;
34673467
params.parseConfigLine(line);
34683468
}
3469-
3470-
MapgenParams *mgparams = m_emerge->getParamsFromSettings(&params);
3469+
3470+
MapgenParams *mgparams;
3471+
try {
3472+
mgparams = m_emerge->getParamsFromSettings(&params);
3473+
} catch (SettingNotFoundException &e) {
3474+
infostream << "Couldn't get a setting from map_meta.txt: "
3475+
<< e.what() << std::endl;
3476+
mgparams = NULL;
3477+
}
3478+
34713479
if (mgparams) {
34723480
if (m_mgparams)
34733481
delete m_mgparams;

0 commit comments

Comments
 (0)
Please sign in to comment.