From 67c01a44c2a32eb47709a1fdc8ac25eb36bb37eb Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Thu, 10 Aug 2017 09:52:53 +0200 Subject: [PATCH] Beds: Do not crash when placing in an unknown node --- mods/beds/api.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/beds/api.lua b/mods/beds/api.lua index 97dde43d..3632dc0c 100644 --- a/mods/beds/api.lua +++ b/mods/beds/api.lua @@ -55,7 +55,7 @@ function beds.register_bed(name, def) end local pos - if minetest.registered_items[minetest.get_node(under).name].buildable_to then + if udef and udef.buildable_to then pos = under else pos = pointed_thing.above -- 2.25.1