mirror of
https://github.com/minetest/minetest_game.git
synced 2024-12-23 07:10:19 +01:00
Beds: Do not crash when placing in an unknown node
This commit is contained in:
parent
ea45ca57a5
commit
876da2fbc6
@ -55,7 +55,7 @@ function beds.register_bed(name, def)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local pos
|
local pos
|
||||||
if minetest.registered_items[minetest.get_node(under).name].buildable_to then
|
if udef and udef.buildable_to then
|
||||||
pos = under
|
pos = under
|
||||||
else
|
else
|
||||||
pos = pointed_thing.above
|
pos = pointed_thing.above
|
||||||
|
Loading…
Reference in New Issue
Block a user