[core/input] do not throw on wrong event type
until now, if a module had registered callbacks, events for nonexistent buttons caused the trigger mechanism to raise an exception.
This commit is contained in:
parent
2756f8fbb3
commit
0f6dfb3f1a
2 changed files with 6 additions and 1 deletions
|
@ -38,7 +38,7 @@ def __invoke(event, callback):
|
|||
if not callback: return
|
||||
if not 'button' in event: return
|
||||
|
||||
for cb in callback.get(event['button']):
|
||||
for cb in callback.get(event['button'], []):
|
||||
if callable(cb):
|
||||
cb(event)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue