From: kwolekr Date: Mon, 18 May 2015 02:32:35 +0000 (-0400) Subject: Fix null dereference when loading schematic from definition without a NodeDefManager X-Git-Tag: 0.4.13~252 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=20aa78cffb6594ff8fdea4291f18d1a8bd252529;p=oweals%2Fminetest.git Fix null dereference when loading schematic from definition without a NodeDefManager --- 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; }