From 6fbe60f1aceeccfb8454cbbe52ecf55af4de1446 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Sat, 27 Apr 2024 07:28:55 +0000 Subject: [PATCH] Fix crash with undefined nodes --- mods/ITEMS/mcl_hoppers/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_hoppers/init.lua b/mods/ITEMS/mcl_hoppers/init.lua index e55a458cf..f3769b866 100644 --- a/mods/ITEMS/mcl_hoppers/init.lua +++ b/mods/ITEMS/mcl_hoppers/init.lua @@ -46,7 +46,7 @@ local function straight_hopper_act(pos, node, active_object_count, active_count_ local dst_name = dst_node.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 ) 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_name = dst_node.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 ) end mcl_util.hopper_push(pos, dst_pos)