From d4e22c07958feeed71b1f979c4a007281cdbebc2 Mon Sep 17 00:00:00 2001 From: Darren Ranalli Date: Wed, 11 Feb 2009 01:33:01 +0000 Subject: [PATCH] fix for crash due to previous checkin --- direct/src/showbase/ContainerLeakDetector.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/direct/src/showbase/ContainerLeakDetector.py b/direct/src/showbase/ContainerLeakDetector.py index 8857c9a28b..bc85db1fda 100755 --- a/direct/src/showbase/ContainerLeakDetector.py +++ b/direct/src/showbase/ContainerLeakDetector.py @@ -547,7 +547,8 @@ class FindContainers(Job): if hasLength or notDeadEnd: # prevent cycles in the references (i.e. base.loader.base) for goesThrough in parentObjRef.goesThroughGen(child): - yield None + # don't yield, container might lose this element + pass if not goesThrough: objRef = ObjectRef(Indirection(evalStr='.__dict__'), id(child), parentObjRef) @@ -585,7 +586,8 @@ class FindContainers(Job): if hasLength or notDeadEnd: # prevent cycles in the references (i.e. base.loader.base) for goesThrough in parentObjRef.goesThroughGen(curObj[key]): - yield None + # don't yield, container might lose this element + pass if not goesThrough: if curObj is __builtin__.__dict__: objRef = ObjectRef(Indirection(evalStr='%s' % key), @@ -636,7 +638,8 @@ class FindContainers(Job): if hasLength or notDeadEnd: # prevent cycles in the references (i.e. base.loader.base) for goesThrough in parentObjRef.goesThrough(curObj[index]): - yield None + # don't yield, container might lose this element + pass if not goesThrough: objRef = ObjectRef(Indirection(evalStr='[%s]' % index), id(curObj[index]), parentObjRef)