RFC BugFix tagtree.c reload data abort
TagNav.lua adds Reload to the Custom View menu of tagnav to allow users to make new search queries on the fly previously you had to reboot the device to do this I was getting a data abort prior to calling tagnav_init now but it worked fine if I copy pasted the contents of the init function I'm not sure how this fixed it but making a static init function makes it work as intended is it a race some weird thing with the compiler?? Ideas?? Change-Id: I7fd6c50f929d3ac2d9ecec5336942288e9213ad5
This commit is contained in:
parent
8f582c90de
commit
3957aa8720
1 changed files with 10 additions and 3 deletions
|
@ -1248,7 +1248,7 @@ static void tagtree_unload(struct tree_context *c)
|
|||
tree_unlock_cache(c);
|
||||
}
|
||||
|
||||
void tagtree_init(void)
|
||||
static bool initialize_tagtree(void) /* also used when user selects 'Reload' in 'custom view'*/
|
||||
{
|
||||
max_history_level = 0;
|
||||
format_count = 0;
|
||||
|
@ -1269,7 +1269,7 @@ void tagtree_init(void)
|
|||
if (!parse_menu(tagnavi_file))
|
||||
{
|
||||
tagtree_unload(NULL);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* safety check since tree.c needs to cast tagentry to entry */
|
||||
|
@ -1286,6 +1286,12 @@ void tagtree_init(void)
|
|||
add_event(PLAYBACK_EVENT_TRACK_FINISH, tagtree_track_finish_event);
|
||||
|
||||
core_shrink(tagtree_handle, core_get_data(tagtree_handle), tagtree_buf_used);
|
||||
return true;
|
||||
}
|
||||
|
||||
void tagtree_init(void)
|
||||
{
|
||||
initialize_tagtree();
|
||||
}
|
||||
|
||||
static bool show_search_progress(bool init, int count)
|
||||
|
@ -1815,7 +1821,8 @@ int tagtree_load(struct tree_context* c)
|
|||
{
|
||||
splash(HZ, str(LANG_WAIT));
|
||||
tagtree_unload(c);
|
||||
tagtree_init();
|
||||
if (!initialize_tagtree())
|
||||
return 0;
|
||||
}
|
||||
c->dirlevel = 0;
|
||||
count = load_root(c);
|
||||
|
|
Loading…
Reference in a new issue