Skip to content

Commit

Permalink
fix torch bow crash when targeting an unknown node
Browse files Browse the repository at this point in the history
  • Loading branch information
FaceDeer committed Jan 6, 2021
1 parent 0c4c691 commit d0b4d8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ local function find_target(raycast)
local above_node = minetest.get_node(above_pos)
local above_def = minetest.registered_nodes[above_node.name]

if above_def.buildable_to and not under_def.buildable_to then
if above_def.buildable_to and ((under_def and not under_def.buildable_to) or not under_def) then
return next_pointed
end

Expand Down

0 comments on commit d0b4d8f

Please sign in to comment.