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

@@ -82,9 +82,6 @@ Path Path::FromUTF8(const char *path_utf8)
p = g_convert(path_utf8, -1,
fs_charset.c_str(), "utf-8",
NULL, NULL, NULL);
if (p == NULL)
/* fall back to UTF-8 */
p = g_strdup(path_utf8);
return Path(Donate(), p);
}