summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2008-05-28 15:41:27 -0400
committerRay Strode <rstrode@redhat.com>2008-05-28 15:41:27 -0400
commitd469d3fd75189c709748a40765eee8bca12aa91c (patch)
treeb1e02ca672d669c53bc82ca3cc338993dea260d7 /src
parent7e0dee1af1d8502fd23cb32358ffab2b9b5655b5 (diff)
downloadplymouth-d469d3fd75189c709748a40765eee8bca12aa91c.tar.gz
plymouth-d469d3fd75189c709748a40765eee8bca12aa91c.tar.xz
plymouth-d469d3fd75189c709748a40765eee8bca12aa91c.zip
Don't crash if the user presses enter when a password isn't being asked for
Diffstat (limited to 'src')
-rw-r--r--src/splash-plugins/spinfinity/spinfinity.c14
1 files changed, 11 insertions, 3 deletions
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);
}