Path::FromUTF8() returns nulled instance on error, add error handling where required

This commit is contained in:
Denis Krjuchkov
2013-01-27 13:26:17 +06:00
parent 943064bb51
commit e98e2a0b07
8 changed files with 69 additions and 23 deletions

View File

@@ -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());
}
}