Fix crash when using the template tool
authorBoba <Boba@boba-xp01>
Mon, 14 Apr 2014 18:05:08 +0000 (20:05 +0200)
committerShadowNinja <shadowninja@minetest.net>
Tue, 15 Apr 2014 00:52:57 +0000 (20:52 -0400)
technic/machines/other/frames.lua

index fed9d85798eee77031c4b08d803536eda74b1d16..b8b4305f1d10ac9bc8aaec5fbe332f2c72128353 100644 (file)
@@ -802,7 +802,7 @@ minetest.register_tool("technic:template_tool",{
        inventory_image = "technic_template_tool.png",
        on_use = function(itemstack, puncher, pointed_thing)
                local pos = pointed_thing.under
-               if pos == nil or (minetest.is_protected and minetest.is_protected(pos, placer:get_player_name())) then
+               if pos == nil or (minetest.is_protected and minetest.is_protected(pos, puncher:get_player_name())) then
                        return nil
                end
                local node = minetest.get_node(pos)