Skip to content

Commit

Permalink
Fix nil error in find_target()
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklp09 committed Nov 26, 2023
1 parent 009e833 commit f834cf7
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 @@ -306,7 +306,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 ((under_def and not under_def.buildable_to) or not under_def) then
if above_def and 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 f834cf7

Please sign in to comment.