aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2015-05-17 22:32:35 -0400
committerkwolekr <kwolekr@minetest.net>2015-05-17 22:32:35 -0400
commit20aa78cffb6594ff8fdea4291f18d1a8bd252529 (patch)
treeba11fa126faf231b5ad46fbc386de558ffa45617
parent46684beec185d13f89c4a91aaa5dd2148ebb0273 (diff)
downloadminetest-20aa78cffb6594ff8fdea4291f18d1a8bd252529.tar.gz
minetest-20aa78cffb6594ff8fdea4291f18d1a8bd252529.tar.bz2
minetest-20aa78cffb6594ff8fdea4291f18d1a8bd252529.zip
Fix null dereference when loading schematic from definition without a NodeDefManager
-rw-r--r--src/script/lua_api/l_mapgen.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/script/lua_api/l_mapgen.cpp b/src/script/lua_api/l_mapgen.cpp
index dc3644e1c..76e94e97e 100644
--- a/src/script/lua_api/l_mapgen.cpp
+++ b/src/script/lua_api/l_mapgen.cpp
@@ -215,7 +215,8 @@ Schematic *load_schematic_from_def(lua_State *L, int index,
}
}
- ndef->pendNodeResolve(schem);
+ if (ndef)
+ ndef->pendNodeResolve(schem);
return schem;
}