[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 3/3] input: add sanity check
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 3/3] input: add sanity check |
Date: |
Tue, 1 Apr 2014 11:18:27 +0200 |
Check we've actually found a input handler before trying to call it.
Signed-off-by: Gerd Hoffmann <address@hidden>
---
ui/input.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ui/input.c b/ui/input.c
index 6e6a924..1ed0e78 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++;
}
--
1.8.3.1