projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0419f78
)
input: add sanity check
author
Gerd Hoffmann
<kraxel@redhat.com>
Mon, 31 Mar 2014 14:07:30 +0000
(16:07 +0200)
committer
Gerd Hoffmann
<kraxel@redhat.com>
Tue, 1 Apr 2014 08:17:45 +0000
(10:17 +0200)
Check we've actually found a input handler before trying to call it.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/input.c
patch
|
blob
|
history
diff --git
a/ui/input.c
b/ui/input.c
index 6e6a92497687fd6b9a0147b46b9850bdcd678b77..1ed0e783b1d676495c44d4d956929ca22cac9a67 100644
(file)
--- 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++;
}