aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/playlist_state.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/playlist_state.c b/src/playlist_state.c
index 9530b7d36..c9d3303ac 100644
--- a/src/playlist_state.c
+++ b/src/playlist_state.c
@@ -68,9 +68,11 @@ playlist_state_save(FILE *fp, const struct playlist *playlist)
getPlayerElapsedTime());
} else {
fprintf(fp, "%s\n", PLAYLIST_STATE_FILE_STATE_STOP);
- fprintf(fp, "%s%i\n", PLAYLIST_STATE_FILE_CURRENT,
+
+ if (playlist->current >= 0)
+ fprintf(fp, "%s%i\n", PLAYLIST_STATE_FILE_CURRENT,
queue_order_to_position(&playlist->queue,
- playlist->current));
+ playlist->current));
}
fprintf(fp, "%s%i\n", PLAYLIST_STATE_FILE_RANDOM,