]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
Don't try to use window if it's not available in text plugin
authorRay Strode <rstrode@redhat.com>
Thu, 25 Sep 2008 01:56:13 +0000 (21:56 -0400)
committerRay Strode <rstrode@redhat.com>
Mon, 29 Sep 2008 03:40:26 +0000 (23:40 -0400)
src/plugins/splash/text/plugin.c

index 0772515ddc540e28732e9f0671444ba683c5031a..23bcc1f654a0c3c7c06fa12db33afb3480c93b20 100644 (file)
@@ -276,12 +276,6 @@ hide_splash_screen (ply_boot_splash_plugin_t *plugin,
       plugin->pending_password_answer = NULL;
     }
 
-  ply_window_set_keyboard_input_handler (plugin->window, NULL, NULL);
-  ply_window_set_backspace_handler (plugin->window, NULL, NULL);
-  ply_window_set_enter_handler (plugin->window, NULL, NULL);
-  ply_window_set_draw_handler (plugin->window, NULL, NULL);
-  ply_window_set_erase_handler (plugin->window, NULL, NULL);
-
   if (plugin->loop != NULL)
     {
       stop_animation (plugin);
@@ -293,10 +287,19 @@ hide_splash_screen (ply_boot_splash_plugin_t *plugin,
       detach_from_event_loop (plugin);
     }
 
-  ply_window_set_background_color (plugin->window, PLY_WINDOW_COLOR_DEFAULT);
-  ply_window_clear_screen (plugin->window);
-  ply_window_show_text_cursor (plugin->window);
-  ply_window_reset_colors (plugin->window);
+  if (plugin->window != NULL)
+    {
+      ply_window_set_keyboard_input_handler (plugin->window, NULL, NULL);
+      ply_window_set_backspace_handler (plugin->window, NULL, NULL);
+      ply_window_set_enter_handler (plugin->window, NULL, NULL);
+      ply_window_set_draw_handler (plugin->window, NULL, NULL);
+      ply_window_set_erase_handler (plugin->window, NULL, NULL);
+
+      ply_window_set_background_color (plugin->window, PLY_WINDOW_COLOR_DEFAULT);
+      ply_window_clear_screen (plugin->window);
+      ply_window_show_text_cursor (plugin->window);
+      ply_window_reset_colors (plugin->window);
+    }
 }
 
 void