From: DoHyun Pyun Date: Tue, 6 Dec 2016 09:10:41 +0000 (+0900) Subject: Fix the svace 2.2 issues X-Git-Tag: submit/tizen/20161219.233906^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cd65be8b0af92b59d3119e6b34c1f9cf659945b7;p=platform%2Fcore%2Fconnectivity%2Fbt-syspopup.git Fix the svace 2.2 issues Change-Id: I94c14228fc84ffe8ade49f17721caf4bb2e61920 Signed-off-by: DoHyun Pyun --- diff --git a/src/bt-syspopup-m.c b/src/bt-syspopup-m.c index 0e3f244..2da6a85 100644 --- a/src/bt-syspopup-m.c +++ b/src/bt-syspopup-m.c @@ -2495,12 +2495,14 @@ static void __bluetooth_session_init(struct bt_popup_appdata *ad) g_type_init(); #endif - conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, NULL); + conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err); if (!conn) { - BT_ERR("ERROR: Can't get on system bus [%s]", - err->message); - g_error_free(err); + if (err) { + BT_ERR("ERROR: Can't get on system bus [%s]", + err->message); + g_error_free(err); + } return; } diff --git a/src/bt-syspopup-w.c b/src/bt-syspopup-w.c index f6c95af..dffdd9d 100644 --- a/src/bt-syspopup-w.c +++ b/src/bt-syspopup-w.c @@ -1908,12 +1908,14 @@ static void __bluetooth_session_init(struct bt_popup_appdata *ad) GDBusConnection *conn = NULL; GError *err = NULL; - conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, NULL); + conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err); if (!conn) { - BT_ERR("ERROR: Can't get on system bus [%s]", - err->message); - g_error_free(err); + if (err) { + BT_ERR("ERROR: Can't get on system bus [%s]", + err->message); + g_error_free(err); + } return; }