Browse Source

Work around a weird crash

rdb 16 years ago
parent
commit
1fe0e144c9
1 changed files with 4 additions and 1 deletions
  1. 4 1
      direct/src/gui/DirectDialog.py

+ 4 - 1
direct/src/gui/DirectDialog.py

@@ -200,7 +200,10 @@ class DirectDialog(DirectFrame):
                           extraArgs = [value])
                           extraArgs = [value])
         # Position buttons and text
         # Position buttons and text
         pad = self['pad']
         pad = self['pad']
-        image = self.component('image0')
+        if self.hascomponent('image0'):
+            image = self.component('image0')
+        else:
+            image = None
         # Get size of text/geom without image (for state 0)
         # Get size of text/geom without image (for state 0)
         if image:
         if image:
             image.reparentTo(hidden)
             image.reparentTo(hidden)