Browse Source

"check for currentControls == None"

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

+ 5 - 2
direct/src/controls/ControlManager.py

@@ -190,11 +190,14 @@ class ControlManager:
 
 
     def collisionsOn(self):
     def collisionsOn(self):
         assert self.notify.debugCall(id(self))
         assert self.notify.debugCall(id(self))
-        self.currentControls.setCollisionsActive(1)
+        if self.currentControls:
+            self.currentControls.setCollisionsActive(1)
+            
 
 
     def collisionsOff(self):
     def collisionsOff(self):
         assert self.notify.debugCall(id(self))
         assert self.notify.debugCall(id(self))
-        self.currentControls.setCollisionsActive(0)
+        if self.currentControls:
+            self.currentControls.setCollisionsActive(0)
 
 
     def placeOnFloor(self):
     def placeOnFloor(self):
         assert self.notify.debugCall(id(self))
         assert self.notify.debugCall(id(self))