From 62649c01f7f84e141b8295fbb0a9e2a5edcd9bf5 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 25 Sep 2015 17:58:21 +0200 Subject: [PATCH] (menu_list.c) Update --- menu/menu_list.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/menu/menu_list.c b/menu/menu_list.c index b875878401..b79e79cdbd 100644 --- a/menu/menu_list.c +++ b/menu/menu_list.c @@ -150,7 +150,6 @@ void menu_list_flush_stack(menu_list_t *list, const char *label = NULL; unsigned type = 0; size_t entry_idx = 0; - menu_navigation_t *nav = menu_navigation_get_ptr(); if (!list) return; @@ -161,7 +160,12 @@ void menu_list_flush_stack(menu_list_t *list, while (menu_list_flush_stack_type( needle, label, type, final_type) != 0) { - menu_list_pop(list->menu_stack, &nav->selection_ptr); + size_t new_selection_ptr; + + menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &new_selection_ptr); + menu_list_pop(list->menu_stack, &new_selection_ptr); + menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &new_selection_ptr); + menu_list_get_last(list->menu_stack, &path, &label, &type, &entry_idx); }