fix nil reference crash

master
Vanessa Ezekowitz 2013-08-31 22:03:23 -04:00
parent 06cfd93647
commit f5fb714f47
1 changed files with 1 additions and 1 deletions

View File

@ -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