From: Kichan Kwon Date: Tue, 30 Jan 2018 05:42:35 +0000 (+0900) Subject: Print GDBus error message only if exist X-Git-Tag: accepted/tizen/4.0/unified/20180131.050236^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4fc15b4ee838ea3e09279d0922bfef6ad6c5f2a1;p=platform%2Fcore%2Fapi%2Fruntime-info.git Print GDBus error message only if exist Change-Id: If8fa90257263bfae969dd982e8e516080dc7a5ba Signed-off-by: Kichan Kwon --- diff --git a/src/runtime_info_usage.c b/src/runtime_info_usage.c index 2137a1a..ff04310 100644 --- a/src/runtime_info_usage.c +++ b/src/runtime_info_usage.c @@ -150,7 +150,8 @@ static GVariant *runtime_info_dbus_request_usage_info(runtime_info_usage_type_e conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err); if (!conn) { //LCOV_EXCL_START : system error - _E("Failed to get dbus connection : %s", err->message); + _E("Failed to get dbus connection : %s", + err && err->message ? err->message : NULL); if (args_in) g_variant_unref(args_in); return NULL; @@ -169,7 +170,8 @@ static GVariant *runtime_info_dbus_request_usage_info(runtime_info_usage_type_e args_in, NULL, G_DBUS_CALL_FLAGS_NONE, DBUS_REPLY_TIMEOUT, NULL, &err); if (!args_out) { //LCOV_EXCL_START : system error - _E("DBUS_METHOD_CALL: not able to send message : %s", err->message); + _E("DBUS_METHOD_CALL: not able to send message : %s", + err && err->message ? err->message : NULL); if (err->code == G_FILE_ERROR_TXTBSY) *error = RUNTIME_INFO_ERROR_PERMISSION_DENIED; else