Browse Source

Prevent free twice.

aignacio_sf 19 years ago
parent
commit
07776f816b
1 changed files with 3 additions and 2 deletions
  1. 3 2
      direct/src/gui/DirectSlider.py

+ 3 - 2
direct/src/gui/DirectSlider.py

@@ -114,8 +114,9 @@ class DirectSlider(DirectFrame):
             raise ValueError, 'Invalid value for orientation: %s' % (self['orientation'])
             raise ValueError, 'Invalid value for orientation: %s' % (self['orientation'])
 
 
     def destroy(self):
     def destroy(self):
-        self.thumb.destroy() # ow!
-        del self.thumb
+        if (hasattr(self, 'thumb')):
+            self.thumb.destroy() # ow!
+            del self.thumb
         DirectFrame.destroy(self)
         DirectFrame.destroy(self)
 
 
     def commandFunc(self):
     def commandFunc(self):