1
0
Fork 0

Fix crash with undefined nodes

hammers_spears
teknomunk 2024-04-27 07:28:55 +00:00
parent 3705be24d7
commit 6fbe60f1ac
1 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ local function straight_hopper_act(pos, node, active_object_count, active_count_
local dst_name = dst_node.name local dst_name = dst_node.name
local dst_def = minetest.registered_nodes[dst_name] local dst_def = minetest.registered_nodes[dst_name]
if dst_def._mcl_hopper_act then if dst_def and dst_def._mcl_hopper_act then
dst_def._mcl_hopper_act( dst_pos, dst_node, active_object_count, active_count_wider ) dst_def._mcl_hopper_act( dst_pos, dst_node, active_object_count, active_count_wider )
end end
@ -78,7 +78,7 @@ local function bent_hopper_act(pos, node, active_object_count, active_object_cou
local dst_node = minetest.get_node(dst_pos) local dst_node = minetest.get_node(dst_pos)
local dst_name = dst_node.name local dst_name = dst_node.name
local dst_def = minetest.registered_nodes[dst_name] local dst_def = minetest.registered_nodes[dst_name]
if dst_def._mcl_hopper_act then if dst_def and dst_def._mcl_hopper_act then
dst_def._mcl_hopper_act( dst_pos, dst_node, active_object_count, active_object_count_wider ) dst_def._mcl_hopper_act( dst_pos, dst_node, active_object_count, active_object_count_wider )
end end
mcl_util.hopper_push(pos, dst_pos) mcl_util.hopper_push(pos, dst_pos)