Fix many crashes when placing item on unknown node

This commit is contained in:
Wuzzy 2017-06-29 13:02:53 +02:00
parent 27481afe06
commit 38cf151806
13 changed files with 41 additions and 12 deletions

View file

@ -54,6 +54,7 @@ mcl_torches.register_torch = function(substring, description, doc_items_longdesc
local under = pointed_thing.under
local node = minetest.get_node(under)
local def = minetest.registered_nodes[node.name]
if not def then return itemstack end
-- Call on_rightclick if the pointed node defines it
if placer and not placer:get_player_control().sneak then