From 12b0954523c4bc254bb3b9114f66d18e85ba3453 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 20 May 2018 15:25:57 +0200 Subject: [PATCH] Fix possible crash in mcl_mapgen_core --- mods/MAPGEN/mcl_mapgen_core/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/MAPGEN/mcl_mapgen_core/init.lua b/mods/MAPGEN/mcl_mapgen_core/init.lua index e7500b7b01..8eee6b132f 100644 --- a/mods/MAPGEN/mcl_mapgen_core/init.lua +++ b/mods/MAPGEN/mcl_mapgen_core/init.lua @@ -1092,8 +1092,8 @@ local function generate_structures(minp, maxp, seed, biomemap) -- Find ground level local ground_y = nil for y = struct_max, struct_min, -1 do - local checknode = minetest.get_node({x=x,y=y,z=z}).name - if minetest.registered_nodes[checknode].walkable then + local checknode = minetest.get_node_or_nil({x=x,y=y,z=z}) + if checknode and minetest.registered_nodes[checknode.name].walkable then ground_y = y break end