From d723220951d445898a85c442f79547479e869047 Mon Sep 17 00:00:00 2001 From: Josh Wilson Date: Fri, 27 Apr 2007 22:12:43 +0000 Subject: [PATCH] "check for currentControls == None" --- direct/src/controls/ControlManager.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/direct/src/controls/ControlManager.py b/direct/src/controls/ControlManager.py index ad4dbaf41f..d570507b32 100755 --- a/direct/src/controls/ControlManager.py +++ b/direct/src/controls/ControlManager.py @@ -190,11 +190,14 @@ class ControlManager: def collisionsOn(self): assert self.notify.debugCall(id(self)) - self.currentControls.setCollisionsActive(1) + if self.currentControls: + self.currentControls.setCollisionsActive(1) + def collisionsOff(self): assert self.notify.debugCall(id(self)) - self.currentControls.setCollisionsActive(0) + if self.currentControls: + self.currentControls.setCollisionsActive(0) def placeOnFloor(self): assert self.notify.debugCall(id(self))