input: add sanity check
Check we've actually found a input handler before trying to call it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
0419f78fae
commit
bdcc3a28b7
@ -143,6 +143,9 @@ void qemu_input_event_send(QemuConsole *src, InputEvent *evt)
|
||||
|
||||
/* send event */
|
||||
s = qemu_input_find_handler(1 << evt->kind);
|
||||
if (!s) {
|
||||
return;
|
||||
}
|
||||
s->handler->event(s->dev, src, evt);
|
||||
s->events++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user