kill crash when closing window from diving game

This commit is contained in:
Redmond Urbino 2007-03-21 01:45:57 +00:00
parent ab72021e6e
commit 4eeaa76c1a

View File

@ -359,6 +359,7 @@ class GravityWalker(DirectObject.DirectObject):
self.cTrav.addCollider(self.cEventSphereNodePath, self.event)
self.cTrav.addCollider(self.cRayNodePath, self.lifter)
else:
if hasattr(self, 'cTrav'):
self.cTrav.removeCollider(self.cWallSphereNodePath)
if self.wantFloorSphere:
self.cTrav.removeCollider(self.cFloorSphereNodePath)