Fix the svace 2.2 issues 27/102927/1 submit/tizen/20161219.233906
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 6 Dec 2016 09:10:41 +0000 (18:10 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 6 Dec 2016 23:56:00 +0000 (08:56 +0900)
Change-Id: I94c14228fc84ffe8ade49f17721caf4bb2e61920
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
src/bt-syspopup-m.c
src/bt-syspopup-w.c

index 0e3f244..2da6a85 100644 (file)
@@ -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;
        }
 
index f6c95af..dffdd9d 100644 (file)
@@ -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;
        }