]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[main] make keyboard removal idempotent
authorRay Strode <rstrode@redhat.com>
Sat, 28 Nov 2009 05:16:22 +0000 (00:16 -0500)
committerRay Strode <rstrode@redhat.com>
Sat, 28 Nov 2009 05:24:58 +0000 (00:24 -0500)
src/main.c

index 3b27edff2be52ee2b43c462fd0f67866a1e298a8..47b6200471d22aaa29b0c7c4b09362867c7fc9f9 100644 (file)
@@ -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