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

@@ -71,6 +71,12 @@ SimpleDatabase::Configure(const struct config_param *param, GError **error_r)
path = Path::FromUTF8(_path);
free(_path);
if (path.IsNull()) {
g_set_error(error_r, simple_db_quark(), 0,
"Failed to convert database path to FS encoding");
return false;
}
return true;
}