From 09926188fd7446d91ed250f6a425f4365f5dccbc Mon Sep 17 00:00:00 2001 From: Darren Ranalli Date: Wed, 18 Apr 2007 00:59:10 +0000 Subject: [PATCH] prevent infinite iteration in flywheel --- direct/src/showbase/PythonUtil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direct/src/showbase/PythonUtil.py b/direct/src/showbase/PythonUtil.py index 0970f8bf61..e8d1ad9e47 100644 --- a/direct/src/showbase/PythonUtil.py +++ b/direct/src/showbase/PythonUtil.py @@ -2813,7 +2813,7 @@ def makeFlywheelGen(objects, countList=None, countFunc=None, scale=None): if index2objectAndCount[key][1] > 0: yield index2objectAndCount[key][0] index2objectAndCount[key][1] -= 1 - if index2objectAndCount[key][1] == 0: + if index2objectAndCount[key][1] <= 0: del index2objectAndCount[key] # if we were not given a list of counts, create it by calling countFunc if countList is None: