mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 08:15:18 -04:00
direct: Resolve DirectScrolledFrame crash on destroy
Destroying DirectScrolledFrames currently crashes the game, because they are destroyed twice. This commit makes sure to destroy the scrolls only once. Closes #574
This commit is contained in:
parent
155b1c38ad
commit
c337e58f4d
@ -100,8 +100,10 @@ class DirectScrolledFrame(DirectFrame):
|
||||
simpleChildGui = self.guiDict.get(parts[-1])
|
||||
if simpleChildGui:
|
||||
simpleChildGui.destroy()
|
||||
self.verticalScroll.destroy()
|
||||
self.horizontalScroll.destroy()
|
||||
del self.verticalScroll
|
||||
del self.horizontalScroll
|
||||
if self.verticalScroll:
|
||||
self.verticalScroll.destroy()
|
||||
if self.horizontalScroll:
|
||||
self.horizontalScroll.destroy()
|
||||
self.verticalScroll = None
|
||||
self.horizontalScroll = None
|
||||
DirectFrame.destroy(self)
|
||||
|
Loading…
x
Reference in New Issue
Block a user