Browse Source

direct: Fix RuntimeError during ControlManager deletion

Closes #884
Derzsi Dániel 5 years ago
parent
commit
7ce1a9ffed
1 changed files with 1 additions and 1 deletions
  1. 1 1
      direct/src/controls/ControlManager.py

+ 1 - 1
direct/src/controls/ControlManager.py

@@ -144,7 +144,7 @@ class ControlManager:
     def delete(self):
     def delete(self):
         assert self.notify.debugCall(id(self))
         assert self.notify.debugCall(id(self))
         self.disable()
         self.disable()
-        for controls in self.controls.keys():
+        for controls in list(self.controls.keys()):
             self.remove(controls)
             self.remove(controls)
         del self.controls
         del self.controls
         del self.currentControls
         del self.currentControls