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/db/SimpleDatabasePlugin.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/db/SimpleDatabasePlugin.cxx') diff --git a/src/db/SimpleDatabasePlugin.cxx b/src/db/SimpleDatabasePlugin.cxx index b7c60d9d8..d617b08dd 100644 --- a/src/db/SimpleDatabasePlugin.cxx +++ b/src/db/SimpleDatabasePlugin.cxx @@ -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; } -- cgit v1.2.3