]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[keyboard] make stop_watching_for_terminal_input idempotent
authorRay Strode <rstrode@redhat.com>
Thu, 8 Oct 2009 19:42:27 +0000 (15:42 -0400)
committerRay Strode <rstrode@redhat.com>
Thu, 8 Oct 2009 19:42:27 +0000 (15:42 -0400)
src/libplybootsplash/ply-keyboard.c

index 375ddd54c3fafa575ab5cba74f19298c0e30c39a..ab728234d4fa9d0d18c49a94e1fa5e7095c290c7 100644 (file)
@@ -357,6 +357,9 @@ ply_keyboard_watch_for_terminal_input (ply_keyboard_t *keyboard)
 static void
 ply_keyboard_stop_watching_for_terminal_input (ply_keyboard_t *keyboard)
 {
+  if (keyboard->provider.if_terminal->input_watch == NULL)
+    return;
+
   ply_event_loop_stop_watching_fd (keyboard->loop,
                                    keyboard->provider.if_terminal->input_watch);
   keyboard->provider.if_terminal->input_watch = NULL;