fix dnd added empty file path to the playlist
[uwplayer.git] / application / utils.c
index a383a2e..5d18fdb 100644 (file)
@@ -65,6 +65,9 @@ char* util_concat_path(const char *url_base, const char *p) {
 
 const char* util_resource_name(const char *url) {
     cxstring urlstr = cx_str(url);
+    if(urlstr.length == 0) {
+        return url;
+    }
     if(urlstr.ptr[urlstr.length-1] == '/') {
         urlstr.length--;
     }