From: SmallJoker Date: Thu, 10 Aug 2017 07:52:53 +0000 (+0200) Subject: Beds: Do not crash when placing in an unknown node X-Git-Tag: 5.0.0~192 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=67c01a44c2a32eb47709a1fdc8ac25eb36bb37eb;p=oweals%2Fminetest_game.git Beds: Do not crash when placing in an unknown node --- 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