diff --git a/direct/src/gui/OnscreenPanel.py b/direct/src/gui/OnscreenPanel.py index 5d03999909..00d4070e50 100644 --- a/direct/src/gui/OnscreenPanel.py +++ b/direct/src/gui/OnscreenPanel.py @@ -185,9 +185,11 @@ class OnscreenPanel(PandaObject.PandaObject, NodePath): for button in self.panelButtons: button.cleanup() + del self.panelButtons for text in self.panelText: text.cleanup() + del self.panelText if not self.isEmpty(): self.removeNode() @@ -397,5 +399,3 @@ class OnscreenPanel(PandaObject.PandaObject, NodePath): self.geomRect[0], self.geomRect[1], self.geomRect[2], self.geomRect[3]) - -