diff options
author | kwolekr <kwolekr@minetest.net> | 2013-04-07 01:50:20 -0400 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2013-04-07 01:50:20 -0400 |
commit | 5961106f9ffd9e9a2bc23e4bd700f6ce07505c9a (patch) | |
tree | b86075375d2110d27b03076d69e93ef3808d8bfe /src | |
parent | fbf76184f0b8ec715255ed1246e49b575fc84873 (diff) | |
download | minetest-5961106f9ffd9e9a2bc23e4bd700f6ce07505c9a.tar.gz minetest-5961106f9ffd9e9a2bc23e4bd700f6ce07505c9a.tar.bz2 minetest-5961106f9ffd9e9a2bc23e4bd700f6ce07505c9a.zip |
Fix crash on creating map with invalid mg_name
Diffstat (limited to 'src')
-rw-r--r-- | src/emerge.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/emerge.cpp b/src/emerge.cpp index 2a5e84f67..499aaf291 100644 --- a/src/emerge.cpp +++ b/src/emerge.cpp @@ -243,6 +243,8 @@ MapgenParams *EmergeManager::createMapgenParams(std::string mgname) { MapgenParams *EmergeManager::getParamsFromSettings(Settings *settings) { std::string mg_name = settings->get("mg_name"); MapgenParams *mgparams = createMapgenParams(mg_name); + if (!mgparams) + return NULL; mgparams->mg_name = mg_name; mgparams->seed = settings->getU64(settings == g_settings ? "fixed_map_seed" : "seed"); |