summaryrefslogtreecommitdiff
path: root/ui/input.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2014-03-31 16:07:30 +0200
committerGerd Hoffmann <kraxel@redhat.com>2014-04-01 10:17:45 +0200
commitbdcc3a28b7f6ed6b90ad8b8af7b5d17e0d3f1f06 (patch)
tree7ac1dd7e413f0b9212e319b9a3ef9e7b565c5cbc /ui/input.c
parent0419f78fae1d70bb5de0d44be62ec9741c5a742b (diff)
downloadqemu-bdcc3a28b7f6ed6b90ad8b8af7b5d17e0d3f1f06.tar.gz
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>
Diffstat (limited to 'ui/input.c')
-rw-r--r--ui/input.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/input.c b/ui/input.c
index 6e6a924976..1ed0e783b1 100644
--- a/ui/input.c
+++ b/ui/input.c
@@ -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++;
}