summaryrefslogtreecommitdiffstats
path: root/apps/playlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/playlist.c')
-rw-r--r--apps/playlist.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index b349799269..4e4e3ed42a 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -2082,8 +2082,13 @@ int playlist_add(const char *filename)
struct playlist_info* playlist = &current_playlist;
int len = strlen(filename);
- if((len+1 > playlist->buffer_size - playlist->buffer_end_pos) ||
- (playlist->amount >= playlist->max_playlist_size))
+ if(len+1 > playlist->buffer_size - playlist->buffer_end_pos)
+ {
+ notify_buffer_full();
+ return -2;
+ }
+
+ if(playlist->amount >= playlist->max_playlist_size)
{
notify_buffer_full();
return -1;