From 7077022b3e565664bc1d59770cc33a892762cec9 Mon Sep 17 00:00:00 2001 From: cheapie Date: Sat, 27 Apr 2024 20:32:02 -0500 Subject: Fix crash if a PI is paired to an uninitialized controller --- pilantern.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/pilantern.lua b/pilantern.lua index c156934..83eabe9 100644 --- a/pilantern.lua +++ b/pilantern.lua @@ -116,6 +116,7 @@ function celevator.pi.flash(pos,what) end function celevator.pi.settext(pos,text) + if not text then text = " --" end if minetest.get_item_group(celevator.get_node(pos).name,"_celevator_pi") ~= 1 then return end local meta = minetest.get_meta(pos) if string.len(text) < 3 then -- cgit v1.2.3