Fix crash when inserting e.g. a door.

This commit is contained in:
Auke Kok 2017-02-10 20:50:40 -08:00
parent ba2220faa4
commit 82921a6730

View File

@ -49,7 +49,7 @@ local function flowerpot_on_rightclick(pos, node, clicker, itemstack, pointed_th
local name = "flowerpot:" .. nodename:gsub(":", "_")
local def = minetest.registered_nodes[name]
if not def then
return false
return itemstack
end
minetest.sound_play(def.sounds.place, {pos = pos})
minetest.swap_node(pos, {name = name})