fix: use right function in element:destroy()
This commit is contained in:
parent
c95ff30d6e
commit
2065e4ce9c
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue