From c9f391579257754c72931d2c196ae1b4a208a33f Mon Sep 17 00:00:00 2001 From: binarycat Date: Sat, 16 Dec 2023 17:02:39 -0500 Subject: [PATCH] fix crash caused by missing nil check --- mesecons_pistons/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesecons_pistons/init.lua b/mesecons_pistons/init.lua index 9fa26c5..c6273a5 100644 --- a/mesecons_pistons/init.lua +++ b/mesecons_pistons/init.lua @@ -88,7 +88,7 @@ local piston_on = function(pos, node) local meta = minetest.get_meta(pos) -- NOTE: this gets calculated twice, but fixing this would mean changing the public api. local stack = mesecon.mvps_get_stack(pusher_pos, dir, max_push, meta:get_string("owner")) - for _, n in ipairs(stack) do + for _, n in ipairs(stack or {}) do -- fix issue 645 if vector.equals(n.pos, behind_pos) then return