summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/playlist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 34a3ea53d2..2b94a13bca 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -524,7 +524,7 @@ static void update_playlist_filename(struct playlist_info* playlist,
/* If the dir does not end in trailing slash, we use a separator.
Otherwise we don't. */
- if('/' != dir[dirlen-1])
+ if(!dirlen || '/' != dir[dirlen-1])
{
sep="/";
dirlen++;