diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2009-12-22 06:08:41 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2009-12-22 06:08:41 +0000 |
commit | 5113f5a9f6a518a83407ff90436ae97b287b2d33 (patch) | |
tree | 13849b77a40e17ebe608dc2261622a099c8265a3 /apps/playlist_catalog.c | |
parent | 7b244231809ab8c4495b1384819f793d670d136b (diff) | |
download | rockbox-5113f5a9f6a518a83407ff90436ae97b287b2d33.tar.gz rockbox-5113f5a9f6a518a83407ff90436ae97b287b2d33.tar.bz2 rockbox-5113f5a9f6a518a83407ff90436ae97b287b2d33.zip |
Fix FS#10368 - add some recursion protection in the "view playlist catalogue" context menu options. Its not exactly pretty, but this shouldnt happen often. It would be nicer to actually hide the menu item, but slightly difficult to do
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24097 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playlist_catalog.c')
-rw-r--r-- | apps/playlist_catalog.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/apps/playlist_catalog.c b/apps/playlist_catalog.c index 5e8cf02c96..01899f737f 100644 --- a/apps/playlist_catalog.c +++ b/apps/playlist_catalog.c @@ -431,16 +431,19 @@ exit: close(fd); return result; } - +static bool in_cat_viewer = false; bool catalog_view_playlists(void) { - if (initialize_catalog() == -1) + bool retval = true; + if (in_cat_viewer) return false; - - if (display_playlists(NULL, true) == -1) + + if (initialize_catalog() == -1) return false; - - return true; + in_cat_viewer = true; + retval = (display_playlists(NULL, true) != -1); + in_cat_viewer = false; + return retval; } bool catalog_add_to_a_playlist(const char* sel, int sel_attr, |