From 2b623dc9edbe4532fb4f0f1e413a56f5bc53c8f8 Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 19 Jan 2005 01:35:44 +0000 Subject: [PATCH] prevent crash if disable called twice (for instance, from multiple inheritance) --- direct/src/distributed/DistributedNode.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/direct/src/distributed/DistributedNode.py b/direct/src/distributed/DistributedNode.py index e288fafed4..9594a3c570 100644 --- a/direct/src/distributed/DistributedNode.py +++ b/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: