Merge pull request #27 from Pilcrow182/patch-1

Do not pass a nil itemstack to on_rightclick
This commit is contained in:
Diego Martínez 2013-12-13 12:31:49 -08:00
commit 981b9fb0bd

View File

@ -1,4 +1,3 @@
local S = homedecor.gettext local S = homedecor.gettext
-- CONSTANTS -- CONSTANTS
@ -401,7 +400,7 @@ if not homedecor.disable_signs then
local node=minetest.get_node(pointed_thing.under) local node=minetest.get_node(pointed_thing.under)
if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then
return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer) return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack)
else else
local above = pointed_thing.above local above = pointed_thing.above
local under = pointed_thing.under local under = pointed_thing.under