Code

fixed crash while saving a playlist
authorRomain Bignon <romain@peerfuse.org>
Tue, 3 Mar 2009 21:09:56 +0000 (22:09 +0100)
committerMax Kellermann <max@duempel.org>
Tue, 3 Mar 2009 21:12:51 +0000 (22:12 +0100)
It happens when there isn't any playlist in browser

src/screen_file.c

index f9325c092631ac3ffec83ee4b167eb0525ed2d1d..09d8dee08820f662567ad96062eb7d2eb2858524 100644 (file)
@@ -99,7 +99,8 @@ handle_save(mpdclient_t *c)
                }
        }
 
-       defaultname = utf8_to_locale(defaultname);
+       if(defaultname)
+               defaultname = utf8_to_locale(defaultname);
        ret = playlist_save(c, NULL, defaultname);
        g_free(defaultname);