mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-31 14:02:05 -06:00
Don't crash on keyboard input with no handler
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>
This commit is contained in:
parent
efbc42e584
commit
4282c82770
1 changed files with 1 additions and 1 deletions
|
@ -414,7 +414,7 @@ void kbd_put_keycode(int keycode)
|
||||||
if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) {
|
if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (entry) {
|
if (entry && entry->put_kbd) {
|
||||||
entry->put_kbd(entry->opaque, keycode);
|
entry->put_kbd(entry->opaque, keycode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue