From 1fa4f91a6171fc0585734a766505dbbdd064e175 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Sat, 28 Nov 2009 00:16:22 -0500
Subject: [PATCH 1/2] [main] make keyboard removal idempotent
---
src/main.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/main.c b/src/main.c
index 3b27edf..47b6200 100644
--- a/src/main.c
+++ b/src/main.c
@@ -553,9 +553,12 @@ remove_displays_and_keyboard (state_t *state)
node = next_node;
}
- ply_keyboard_stop_watching_for_input (state->keyboard);
- ply_keyboard_free (state->keyboard);
- state->keyboard = NULL;
+ if (state->keyboard != NULL)
+ {
+ ply_keyboard_stop_watching_for_input (state->keyboard);
+ ply_keyboard_free (state->keyboard);
+ state->keyboard = NULL;
+ }
}
static void
--
1.6.6
From 8bb69cd87586af3eb5bfb2b7b56288b031823158 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Sat, 28 Nov 2009 00:24:21 -0500
Subject: [PATCH 2/2] [main] only set keyboard on splash if available
There may be cases where there is no keyboard set.
---
src/main.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/main.c b/src/main.c
index 47b6200..197c8e6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1044,7 +1044,8 @@ add_displays_and_keyboard_to_boot_splash (state_t *state,
ply_list_node_t *node;
ply_trace ("setting keyboard on boot splash");
- ply_boot_splash_set_keyboard (splash, state->keyboard);
+ if (state->keyboard != NULL)
+ ply_boot_splash_set_keyboard (splash, state->keyboard);
node = ply_list_get_first_node (state->pixel_displays);
while (node != NULL)
--
1.6.6