projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbf7618
)
Fix crash on creating map with invalid mg_name
author
kwolekr
<kwolekr@minetest.net>
Sun, 7 Apr 2013 05:50:20 +0000
(
01:50
-0400)
committer
kwolekr
<kwolekr@minetest.net>
Sun, 7 Apr 2013 05:50:20 +0000
(
01:50
-0400)
src/emerge.cpp
patch
|
blob
|
history
diff --git
a/src/emerge.cpp
b/src/emerge.cpp
index 2a5e84f67c8ca1d9a9fc2933083c03d6f0c96690..499aaf291916d962818f1bccd50967e0d957d33b 100644
(file)
--- 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");