[Spice-commits] server/inputs_channel.c
Christophe Fergau
teuf at kemper.freedesktop.org
Wed Aug 12 01:34:16 PDT 2015
server/inputs_channel.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit a5ec6a29231884162a7003ddefdc0d52d4f9126b
Author: Alon Levy <alon at pobox.com>
Date: Tue Aug 11 20:48:03 2015 +0100
server/inputs_channel: Cope with NULL keyboard in release_keys()
This fixes a test_display_no_ssl segfault on client disconnect when
the keyboard was never initialized.
diff --git a/server/inputs_channel.c b/server/inputs_channel.c
index b0ba1d6..2934572 100644
--- a/server/inputs_channel.c
+++ b/server/inputs_channel.c
@@ -483,7 +483,12 @@ static int inputs_channel_handle_parsed(RedChannelClient *rcc, uint32_t size, ui
static void inputs_release_keys(void)
{
int i;
- SpiceKbdState *st = keyboard->st;
+ SpiceKbdState *st;
+
+ if (!keyboard) {
+ return;
+ }
+ st = keyboard->st;
for (i = 0; i < SPICE_N_ELEMENTS(st->key); i++) {
if (!st->key[i])
More information about the Spice-commits
mailing list