From: Gerd Hoffmann Date: Mon, 31 Mar 2014 14:07:30 +0000 (+0200) Subject: input: add sanity check X-Git-Tag: v2.0.0-rc1~8^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bdcc3a28b7f6ed6b90ad8b8af7b5d17e0d3f1f06;p=thirdparty%2Fqemu.git input: add sanity check Check we've actually found a input handler before trying to call it. Signed-off-by: Gerd Hoffmann --- diff --git a/ui/input.c b/ui/input.c index 6e6a9249768..1ed0e783b1d 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++; }