[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 12/14] Don't crash on keyboard input with no handler
From: |
Michael Tokarev |
Subject: |
[Qemu-devel] [PULL 12/14] Don't crash on keyboard input with no handler |
Date: |
Fri, 6 Dec 2013 23:15:39 +0400 |
From: Don Koch <address@hidden>
Prevent a call to put_kbd if null.
On shutdown of some OSes, the keyboard handler goes away before the
system is down. If a key is typed during this window, qemu crashes.
Signed-off-by: Don Koch <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
ui/input.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/input.c b/ui/input.c
index 10d8c05..1c70f60 100644
--- a/ui/input.c
+++ b/ui/input.c
@@ -414,7 +414,7 @@ void kbd_put_keycode(int keycode)
if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) {
return;
}
- if (entry) {
+ if (entry && entry->put_kbd) {
entry->put_kbd(entry->opaque, keycode);
}
}
--
1.7.10.4
- [Qemu-devel] [PULL 00/14] Trivial patches for 2013-12-06, Michael Tokarev, 2013/12/06
- [Qemu-devel] [PULL 02/14] trace: Remove trace.h from hw/usb/hcd-ehci.h (less dependencies), Michael Tokarev, 2013/12/06
- [Qemu-devel] [PULL 03/14] console: Replace conditional debug messages by trace methods, Michael Tokarev, 2013/12/06
- [Qemu-devel] [PULL 05/14] .gitignore: Ignore config.status, Michael Tokarev, 2013/12/06
- [Qemu-devel] [PULL 04/14] gtk: Replace conditional debug messages by trace methods, Michael Tokarev, 2013/12/06
- [Qemu-devel] [PULL 01/14] trace: Remove trace.h from console.h (less dependencies), Michael Tokarev, 2013/12/06
- [Qemu-devel] [PULL 12/14] Don't crash on keyboard input with no handler,
Michael Tokarev <=
- [Qemu-devel] [PULL 10/14] libcacard/cac: Remove unused statement (value stored is never read), Michael Tokarev, 2013/12/06
- [Qemu-devel] [PULL 14/14] eeprom93xx: fix coding style, Michael Tokarev, 2013/12/06
- [Qemu-devel] [PULL 08/14] misc: Replace 'struct QEMUTimer' by 'QEMUTimer', Michael Tokarev, 2013/12/06
- [Qemu-devel] [PULL 11/14] libcacard/vcard_emul_nss: Remove unused statement (value stored is never read), Michael Tokarev, 2013/12/06
- [Qemu-devel] [PULL 13/14] hw/ppc/mac.h: remove unused BIOS_FILENAME definition, Michael Tokarev, 2013/12/06
- [Qemu-devel] [PULL 07/14] qobject: Fix compiler warning (missing gnu_printf format attribute), Michael Tokarev, 2013/12/06
- [Qemu-devel] [PULL 06/14] acpi-build: Fix compiler warning (missing gnu_printf format attribute), Michael Tokarev, 2013/12/06
- [Qemu-devel] [PULL 09/14] virtio-net: fix the indent, Michael Tokarev, 2013/12/06