Fix a bug when removing an event handler
This commit is contained in:
parent
5e3f2ab19f
commit
2ba504ae9a
1 changed files with 1 additions and 1 deletions
|
@ -98,7 +98,7 @@ class EventHandler:
|
||||||
priority.remove(callback)
|
priority.remove(callback)
|
||||||
else:
|
else:
|
||||||
callbacks = self.events[name]
|
callbacks = self.events[name]
|
||||||
for priority in callbacks.entries():
|
for priority in callbacks.values():
|
||||||
for entry in priority[:]:
|
for entry in priority[:]:
|
||||||
if entry == callback:
|
if entry == callback:
|
||||||
priority.remove(callback)
|
priority.remove(callback)
|
||||||
|
|
Loading…
Reference in a new issue