summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/playlist.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index a63d974a7f..9adc2c088c 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -1652,6 +1652,9 @@ static int flush_cached_control(struct playlist_info* playlist)
1652 int result = 0; 1652 int result = 0;
1653 int i; 1653 int i;
1654 1654
1655 if (!playlist->num_cached)
1656 return 0;
1657
1655 lseek(playlist->control_fd, 0, SEEK_END); 1658 lseek(playlist->control_fd, 0, SEEK_END);
1656 1659
1657 for (i=0; i<playlist->num_cached; i++) 1660 for (i=0; i<playlist->num_cached; i++)
@@ -1714,12 +1717,9 @@ static int flush_cached_control(struct playlist_info* playlist)
1714 result = 0; 1717 result = 0;
1715 } 1718 }
1716 else 1719 else
1717 result = -1;
1718
1719 if (result < 0)
1720 { 1720 {
1721 result = -1;
1721 gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR)); 1722 gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR));
1722 return result;
1723 } 1723 }
1724 1724
1725 return result; 1725 return result;