From: kwolekr Date: Sat, 6 Apr 2013 17:36:31 +0000 (-0400) Subject: Don't re-write entire map_meta.txt if a setting is missing X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=453d79e3a201a4186dae386d0bce209f75be742c;p=zefram%2Fminetest%2Fminetest_engine.git Don't re-write entire map_meta.txt if a setting is missing --- diff --git a/src/map.cpp b/src/map.cpp index 39f5e30f..c9f473dc 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -3466,8 +3466,16 @@ void ServerMap::loadMapMeta() break; params.parseConfigLine(line); } - - MapgenParams *mgparams = m_emerge->getParamsFromSettings(¶ms); + + MapgenParams *mgparams; + try { + mgparams = m_emerge->getParamsFromSettings(¶ms); + } 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;