Add the exception handling logic for TC 58/183158/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 3 Jul 2018 04:37:41 +0000 (13:37 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 3 Jul 2018 04:37:41 +0000 (13:37 +0900)
Change-Id: Ica763636439fa93579f0c92c443f977a7af91c98
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
ag-agent/bluetooth-ag-agent.c
hid-agent/bluetooth-hid-agent.c

index 099485c..609da2e 100644 (file)
@@ -1244,7 +1244,8 @@ gboolean _bt_hfp_agent_nrec_status(gboolean status,
        else
                hs->nrec_status = TRUE;
 
-       _bt_ag_agent_emit_signal(ag_dbus_conn, hs->path,
+       if (ag_dbus_conn)
+               _bt_ag_agent_emit_signal(ag_dbus_conn, hs->path,
                                        BT_AG_SERVICE_NAME, "NrecStatusChanged",
                                        g_variant_new("(b)", status));
        FN_END;
index f1790c1..fcf5e01 100644 (file)
@@ -782,9 +782,10 @@ static void __bt_hid_agent_dbus_deinit(void)
 bt_hid_agent_error_t _bt_hid_disconnect_profile(void)
 {
        FN_START;
-       GDBusProxy *proxy;
+       GDBusProxy *proxy = NULL;
 
-       proxy = __bt_hid_gdbus_get_device_proxy(bt_hid_info.object_path);
+       if (bt_hid_info.object_path)
+               proxy = __bt_hid_gdbus_get_device_proxy(bt_hid_info.object_path);
 
        if (proxy == NULL) {
                ERR("Error while getting proxy");