aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlaylistSave.cxx
diff options
context:
space:
mode:
authorDenis Krjuchkov <denis@crazydev.net>2013-01-27 13:26:17 +0600
committerDenis Krjuchkov <denis@crazydev.net>2013-01-28 00:13:46 +0600
commite98e2a0b07363132707146f571d3411e3e1b8076 (patch)
treece4653efde5670ca2a151e2888114ac9c0423fe4 /src/PlaylistSave.cxx
parent943064bb5148884339ccaf60e276191bc4d9abd9 (diff)
downloadmpd-e98e2a0b07363132707146f571d3411e3e1b8076.tar.gz
mpd-e98e2a0b07363132707146f571d3411e3e1b8076.tar.xz
mpd-e98e2a0b07363132707146f571d3411e3e1b8076.zip
Path::FromUTF8() returns nulled instance on error, add error handling where required
Diffstat (limited to '')
-rw-r--r--src/PlaylistSave.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/PlaylistSave.cxx b/src/PlaylistSave.cxx
index d165911a4..49e475ee5 100644
--- a/src/PlaylistSave.cxx
+++ b/src/PlaylistSave.cxx
@@ -46,7 +46,8 @@ playlist_print_song(FILE *file, const struct song *song)
const Path uri_fs = Path::FromUTF8(uri);
g_free(uri);
- fprintf(file, "%s\n", uri_fs.c_str());
+ if (!uri_fs.IsNull())
+ fprintf(file, "%s\n", uri_fs.c_str());
}
}