mirror of https://github.com/xqemu/xqemu.git
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 */
|
/* send event */
|
||||||
s = qemu_input_find_handler(1 << evt->kind);
|
s = qemu_input_find_handler(1 << evt->kind);
|
||||||
|
if (!s) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
s->handler->event(s->dev, src, evt);
|
s->handler->event(s->dev, src, evt);
|
||||||
s->events++;
|
s->events++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue