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:
Gerd Hoffmann 2014-03-31 16:07:30 +02:00
parent 0419f78fae
commit bdcc3a28b7

View File

@ -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++;
}