summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2007-04-11 22:39:12 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2007-04-11 22:39:12 +0000
commitb16137e10b0b309ccd9bf81fb2d70f24b090aa7d (patch)
treee889ada3d215d8366ac9cb376ba34fb074bf1a0a /apps
parentd6e822cab9b4f1294a8789632c737d0d8f71ef58 (diff)
downloadrockbox-b16137e10b0b309ccd9bf81fb2d70f24b090aa7d.tar.gz
rockbox-b16137e10b0b309ccd9bf81fb2d70f24b090aa7d.zip
Make sure selected track of playlist viewer doesn't become bigger than number of tracks when deleting the last track. Fixes FS #6899
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13113 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/playlist_viewer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c
index d065ad32ce..e7558ea1ad 100644
--- a/apps/playlist_viewer.c
+++ b/apps/playlist_viewer.c
@@ -749,6 +749,8 @@ bool playlist_viewer_ex(char* filename)
update_playlist(true);
if (viewer.num_tracks <= 0)
exit = true;
+ if(viewer.selected_track >= viewer.num_tracks)
+ viewer.selected_track = viewer.num_tracks-1;
}
gui_synclist_draw(&playlist_lists);
break;