diff options
author | kwolekr <kwolekr@minetest.net> | 2015-05-17 22:32:35 -0400 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2015-05-17 22:32:35 -0400 |
commit | 20aa78cffb6594ff8fdea4291f18d1a8bd252529 (patch) | |
tree | ba11fa126faf231b5ad46fbc386de558ffa45617 | |
parent | 46684beec185d13f89c4a91aaa5dd2148ebb0273 (diff) | |
download | minetest-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.cpp | 3 |
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; } |