Explorar el Código

prevent infinite iteration in flywheel

Darren Ranalli hace 18 años
padre
commit
09926188fd
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      direct/src/showbase/PythonUtil.py

+ 1 - 1
direct/src/showbase/PythonUtil.py

@@ -2813,7 +2813,7 @@ def makeFlywheelGen(objects, countList=None, countFunc=None, scale=None):
                 if index2objectAndCount[key][1] > 0:
                 if index2objectAndCount[key][1] > 0:
                     yield index2objectAndCount[key][0]
                     yield index2objectAndCount[key][0]
                     index2objectAndCount[key][1] -= 1
                     index2objectAndCount[key][1] -= 1
-                if index2objectAndCount[key][1] == 0:
+                if index2objectAndCount[key][1] <= 0:
                     del index2objectAndCount[key]
                     del index2objectAndCount[key]
     # if we were not given a list of counts, create it by calling countFunc
     # if we were not given a list of counts, create it by calling countFunc
     if countList is None:
     if countList is None: