From 4c7cfbde8eb50ceffaca9eadd6ce8490aea4f25d Mon Sep 17 00:00:00 2001 From: Bluewhale1337 <295648290+Bluewhale1337@users.noreply.github.com> Date: Sat, 4 Jul 2026 14:47:22 +0200 Subject: [PATCH] add null checks when toggling HealBot options panels to prevent errors --- HealBot_Options.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/HealBot_Options.lua b/HealBot_Options.lua index 48d7f5e..82b1f4f 100644 --- a/HealBot_Options.lua +++ b/HealBot_Options.lua @@ -336,10 +336,16 @@ function HealBot_Options_SetSkins() end function HealBot_Options_ShowPanel(id) if HealBot_Options_CurrentPanel>0 then - getglobal("HealBot_Options_Panel"..HealBot_Options_CurrentPanel):Hide(); + local panel = getglobal("HealBot_Options_Panel"..HealBot_Options_CurrentPanel); + if panel then + panel:Hide(); + end end HealBot_Options_CurrentPanel = id; if HealBot_Options_CurrentPanel>0 then - getglobal("HealBot_Options_Panel"..HealBot_Options_CurrentPanel):Show(); + local panel = getglobal("HealBot_Options_Panel"..HealBot_Options_CurrentPanel); + if panel then + panel:Show(); + end end end