From bd023385fba320bb849b1acf80e0873933045e88 Mon Sep 17 00:00:00 2001 From: Teruaki Kawashima Date: Sat, 29 Aug 2009 14:57:23 +0000 Subject: [PATCH] keybox: fix issue when deleted all items. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22533 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/keybox.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/plugins/keybox.c b/apps/plugins/keybox.c index d926105962..f8da40f08e 100644 --- a/apps/plugins/keybox.c +++ b/apps/plugins/keybox.c @@ -172,6 +172,8 @@ static void delete_entry(int selected_item) entry2->next = NULL; rb->gui_synclist_set_nb_items(&kb_list, --pw_list.num_entries); + if(!pw_list.num_entries) + init_ll(); data_changed = true; } @@ -270,7 +272,7 @@ static void edit_pw(int selected_item) static void context_menu(int selected_item) { - int selection, result; + int selection = 0, result; bool exit = false; do { @@ -612,7 +614,7 @@ static void reset(void) static int main_menu(void) { - int selection, result, ret; + int selection = 0, result, ret; bool exit = false; MENUITEM_STRINGLIST(menu, "Keybox", NULL,