From e98e2a0b07363132707146f571d3411e3e1b8076 Mon Sep 17 00:00:00 2001 From: Denis Krjuchkov Date: Sun, 27 Jan 2013 13:26:17 +0600 Subject: Path::FromUTF8() returns nulled instance on error, add error handling where required --- src/PlaylistSave.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/PlaylistSave.cxx') diff --git a/src/PlaylistSave.cxx b/src/PlaylistSave.cxx index d165911a..49e475ee 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()); } } -- cgit v1.2.3