Преглед изворни кода

wxGUI/animation: fix 'RuntimeError: dictionary changed size during iteration' (#908)

Tomas Zigo пре 4 година
родитељ
комит
703cba1477
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      gui/wxpython/animation/provider.py

+ 1 - 1
gui/wxpython/animation/provider.py

@@ -695,7 +695,7 @@ class DictRefCounter:
     def Clear(self):
         """Clears items which are not needed any more."""
         Debug.msg(4, 'DictRefCounter.Clear')
-        for key in self.dictionary.keys():
+        for key in self.dictionary.copy().keys():
             if key is not None:
                 if self.referenceCount[key] <= 0:
                     del self.dictionary[key]