Browse Source

don't crash if no window

David Rose 22 years ago
parent
commit
4f1334176b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      direct/src/showbase/ShowBase.py

+ 1 - 1
direct/src/showbase/ShowBase.py

@@ -608,7 +608,7 @@ class ShowBase(DirectObject.DirectObject):
         if win == None:
             win = self.win
 
-        if win.hasSize():
+        if win != None and win.hasSize():
             aspectRatio = float(win.getXSize()) / float(win.getYSize())
 
         else: