diff options
| author | Hardeep Sidhu <dyp@pobox.com> | 2006-05-11 19:14:18 +0000 |
|---|---|---|
| committer | Hardeep Sidhu <dyp@pobox.com> | 2006-05-11 19:14:18 +0000 |
| commit | cab3a164178ff1720b24f111173bab19cab5c45d (patch) | |
| tree | d1b5d7df63b3afb7a6c6a79a3349fa5644f7f9fd | |
| parent | a65ec014058aacfa7937674c4b29344fa88a91b7 (diff) | |
| download | rockbox-cab3a164178ff1720b24f111173bab19cab5c45d.zip rockbox-cab3a164178ff1720b24f111173bab19cab5c45d.tar.gz rockbox-cab3a164178ff1720b24f111173bab19cab5c45d.tar.bz2 rockbox-cab3a164178ff1720b24f111173bab19cab5c45d.tar.xz | |
Return immediately if we have no control commands to flush. Fixes erroneous playlist control update error when inserting tracks
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9912 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/playlist.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/playlist.c b/apps/playlist.c index a63d974..9adc2c0 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -1652,6 +1652,9 @@ static int flush_cached_control(struct playlist_info* playlist) int result = 0; int i; + if (!playlist->num_cached) + return 0; + lseek(playlist->control_fd, 0, SEEK_END); for (i=0; i<playlist->num_cached; i++) @@ -1714,12 +1717,9 @@ static int flush_cached_control(struct playlist_info* playlist) result = 0; } else - result = -1; - - if (result < 0) { + result = -1; gui_syncsplash(HZ*2, true, str(LANG_PLAYLIST_CONTROL_UPDATE_ERROR)); - return result; } return result; |