Don't crash if the user presses enter when a password isn't being asked for

This commit is contained in:
Ray Strode 2008-05-28 15:41:27 -04:00
parent 7e0dee1af1
commit d469d3fd75

View file

@ -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);
}