From d469d3fd75189c709748a40765eee8bca12aa91c Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 28 May 2008 15:41:27 -0400 Subject: Don't crash if the user presses enter when a password isn't being asked for --- src/splash-plugins/spinfinity/spinfinity.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/splash-plugins/spinfinity/spinfinity.c b/src/splash-plugins/spinfinity/spinfinity.c index 12534d4..f1e9c11 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); } -- cgit