Browse Source

check for currentControls before getIsAirborne()

Josh Wilson 18 years ago
parent
commit
cd3c0ae1c0
1 changed files with 3 additions and 1 deletions
  1. 3 1
      direct/src/controls/ControlManager.py

+ 3 - 1
direct/src/controls/ControlManager.py

@@ -159,7 +159,9 @@ class ControlManager:
         return self.currentControls.getSpeeds()
 
     def getIsAirborne(self):
-        return self.currentControls.getIsAirborne()
+        if self.currentControls:
+            return self.currentControls.getIsAirborne()
+        return False
     
     def setTag(self, key, value):
         assert self.notify.debugCall(id(self))