From: Ray Strode Date: Wed, 28 May 2008 19:41:27 +0000 (-0400) Subject: Don't crash if the user presses enter when a password isn't being asked for X-Git-Tag: 0.1.0~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d469d3fd75189c709748a40765eee8bca12aa91c;p=thirdparty%2Fplymouth.git Don't crash if the user presses enter when a password isn't being asked for --- diff --git a/src/splash-plugins/spinfinity/spinfinity.c b/src/splash-plugins/spinfinity/spinfinity.c index 12534d4f..f1e9c11f 100644 --- a/src/splash-plugins/spinfinity/spinfinity.c +++ b/src/splash-plugins/spinfinity/spinfinity.c @@ -441,11 +441,19 @@ void on_enter (ply_boot_splash_plugin_t *plugin, const char *text) { + if (plugin->password_answer_handler == NULL) + return; + plugin->password_answer_handler (plugin->password_answer_data, text); - plugin->entry->number_of_bullets = 0; - entry_free (plugin->entry); - plugin->entry = NULL; + + if (plugin->entry != NULL) + { + plugin->entry->number_of_bullets = 0; + entry_free (plugin->entry); + plugin->entry = NULL; + } + start_animation (plugin); }