summaryrefslogtreecommitdiffstats
path: root/apps/plugins/keybox.c
diff options
context:
space:
mode:
authorTeruaki Kawashima <teru@rockbox.org>2009-08-29 14:57:23 +0000
committerTeruaki Kawashima <teru@rockbox.org>2009-08-29 14:57:23 +0000
commitbd023385fba320bb849b1acf80e0873933045e88 (patch)
tree14b62fb5ac8731e00c6e0caba03b32b573d82c6f /apps/plugins/keybox.c
parente454a3985275819d998b84bc0cf7b7b8ad9eab00 (diff)
downloadrockbox-bd023385fba320bb849b1acf80e0873933045e88.tar.gz
rockbox-bd023385fba320bb849b1acf80e0873933045e88.tar.bz2
rockbox-bd023385fba320bb849b1acf80e0873933045e88.zip
keybox: fix issue when deleted all items.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22533 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/keybox.c')
-rw-r--r--apps/plugins/keybox.c6
1 files 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,