Browse Source

prevent crash if disable called twice (for instance, from multiple inheritance)

David Rose 21 years ago
parent
commit
2b623dc9ed
1 changed files with 3 additions and 2 deletions
  1. 3 2
      direct/src/distributed/DistributedNode.py

+ 3 - 2
direct/src/distributed/DistributedNode.py

@@ -19,8 +19,9 @@ class DistributedNode(DistributedObject.DistributedObject, NodePath):
         return None
 
     def disable(self):
-        self.reparentTo(hidden)
-        DistributedObject.DistributedObject.disable(self)
+        if self.activeState != DistributedObject.ESDisabled:
+            self.reparentTo(hidden)
+            DistributedObject.DistributedObject.disable(self)
 
     def delete(self):
         try: