From 2065e4ce9c2990731b279a7337b886c884c2143c Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Mon, 30 Aug 2021 14:59:06 +0200 Subject: [PATCH] fix: use right function in element:destroy() --- sonic-radiance.love/birb/modules/gui/elements/parent.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sonic-radiance.love/birb/modules/gui/elements/parent.lua b/sonic-radiance.love/birb/modules/gui/elements/parent.lua index 1de6125..a3b244b 100644 --- a/sonic-radiance.love/birb/modules/gui/elements/parent.lua +++ b/sonic-radiance.love/birb/modules/gui/elements/parent.lua @@ -35,9 +35,9 @@ end function GuiElement:destroy() local gui = self:getGui() - gui:removeElement(self.name) - if (self.screen == nil) then - self.screen:removeElement(self.name) + gui:deleteElement(self.name) + if (self.screen ~= nil) then + self.screen:deleteElement(self.name) end end