Fix a bug when removing an event handler

This commit is contained in:
mathieui 2019-10-26 21:44:17 +02:00
parent 5e3f2ab19f
commit 2ba504ae9a
No known key found for this signature in database
GPG key ID: C59F84CEEFD616E3

View file

@ -98,7 +98,7 @@ class EventHandler:
priority.remove(callback)
else:
callbacks = self.events[name]
for priority in callbacks.entries():
for priority in callbacks.values():
for entry in priority[:]:
if entry == callback:
priority.remove(callback)