aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-06-26 04:34:28 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-06-26 04:34:28 +0000
commit188011ac52932eb2c75dc1e956417ddcf33512bf (patch)
tree47c0e118a0822eb53a9e60dacc939b6affbad73c /src
parentbe37cb02f292f8ee498e5375c8c6218157bf3ec0 (diff)
downloadmpd-188011ac52932eb2c75dc1e956417ddcf33512bf.tar.gz
mpd-188011ac52932eb2c75dc1e956417ddcf33512bf.tar.xz
mpd-188011ac52932eb2c75dc1e956417ddcf33512bf.zip
patch from np for orderPlaylist()
git-svn-id: https://svn.musicpd.org/mpd/trunk@1673 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r--src/playlist.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/playlist.c b/src/playlist.c
index 204c5e231..21a341a08 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -1090,7 +1090,9 @@ int moveSongInPlaylistById(FILE * fp, int id1, int to) {
void orderPlaylist() {
int i;
- playlist.current = playlist.order[playlist.current];
+ if(playlist.current >= 0 && playlist.current < playlist.length) {
+ playlist.current = playlist.order[playlist.current];
+ }
if(playlist_state==PLAYLIST_STATE_PLAY) {
if(playlist.queued>=0) {