From f5fb714f47c58abe079b61f0543c2d42c9775415 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Sat, 31 Aug 2013 22:03:23 -0400 Subject: [PATCH] fix nil reference crash --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 06ed20c..fb4f306 100644 --- a/init.lua +++ b/init.lua @@ -146,7 +146,7 @@ minetest.register_node("gloopblocks:scaffolding", { groups = {choppy=3, oddly_breakable_by_hand=3}, sounds = default.node_sound_wood_defaults(), on_rightclick = function(pos, node, clicker, itemstack) - if itemstack:get_name() == node.name then + if itemstack and itemstack:get_name() == node.name then for i = 1,19 do if minetest.get_node({x=pos.x,y=pos.y-i,z=pos.z}).name == "gloopblocks:scaffolding" and scafffound ~= 0 and scafffound ~= 1 then local scafffound = 1