changeset 12267:14bdbd687113

Fail if empty or nonexitant playlist Patch by adland
author rtognimp
date Sat, 24 Apr 2004 13:15:31 +0000
parents 096072d234c6
children 4ab5c05ef3eb
files parser-mpcmd.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/parser-mpcmd.c	Sat Apr 24 10:33:19 2004 +0000
+++ b/parser-mpcmd.c	Sat Apr 24 13:15:31 2004 +0000
@@ -34,15 +34,15 @@
   if(strcasecmp(opt,"playlist") == 0) { // We handle playlist here
     if(!param)
       return M_OPT_MISSING_PARAM;
+
     entry = parse_playlist_file(param);
     if(!entry)
-      return 1;
+      return -1;
+    else {
+       *ret=entry;
+       return 1;
+    }
   }
-
-  if(entry) {
-    *ret = entry;
-    return 1;
-  } else
     return 0;
 }