Skip to content

Commit

Permalink
Fix crash when using wrench on air or object (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
nixnoxus committed Nov 28, 2021
1 parent 166da3e commit f5a37b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wrench/tool.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ minetest.register_tool("wrench:wrench", {
end
local name = player:get_player_name()
local pos = pointed_thing.under
if minetest.is_protected(pos, name) then
if not pos or minetest.is_protected(pos, name) then
return
end
local picked_up, err_msg = wrench.pickup_node(pos, player)
Expand Down

0 comments on commit f5a37b1

Please sign in to comment.