From: Ray Strode Date: Thu, 25 Sep 2008 01:56:13 +0000 (-0400) Subject: Don't try to use window if it's not available in text plugin X-Git-Tag: 0.6.0~124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7200c851eaa3ec4c6b9aaee9376aca5f40d9ec76;p=thirdparty%2Fplymouth.git Don't try to use window if it's not available in text plugin --- diff --git a/src/plugins/splash/text/plugin.c b/src/plugins/splash/text/plugin.c index 0772515d..23bcc1f6 100644 --- a/src/plugins/splash/text/plugin.c +++ b/src/plugins/splash/text/plugin.c @@ -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