mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -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])
|
simpleChildGui = self.guiDict.get(parts[-1])
|
||||||
if simpleChildGui:
|
if simpleChildGui:
|
||||||
simpleChildGui.destroy()
|
simpleChildGui.destroy()
|
||||||
self.verticalScroll.destroy()
|
if self.verticalScroll:
|
||||||
self.horizontalScroll.destroy()
|
self.verticalScroll.destroy()
|
||||||
del self.verticalScroll
|
if self.horizontalScroll:
|
||||||
del self.horizontalScroll
|
self.horizontalScroll.destroy()
|
||||||
|
self.verticalScroll = None
|
||||||
|
self.horizontalScroll = None
|
||||||
DirectFrame.destroy(self)
|
DirectFrame.destroy(self)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user