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 <dkoch@verizon.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) {
return;
}
- if (entry) {
+ if (entry && entry->put_kbd) {
entry->put_kbd(entry->opaque, keycode);
}
}