From: DoHyun Pyun Date: Tue, 3 Jul 2018 04:37:41 +0000 (+0900) Subject: Add the exception handling logic for TC X-Git-Tag: accepted/tizen/unified/20180813.061325~6 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fconnectivity%2Fbluetooth-agent.git;a=commitdiff_plain;h=d2ba4b158023351f7b316308e3b593f6d6ae7b0e Add the exception handling logic for TC Change-Id: Ica763636439fa93579f0c92c443f977a7af91c98 Signed-off-by: DoHyun Pyun --- diff --git a/ag-agent/bluetooth-ag-agent.c b/ag-agent/bluetooth-ag-agent.c index 099485c..609da2e 100644 --- a/ag-agent/bluetooth-ag-agent.c +++ b/ag-agent/bluetooth-ag-agent.c @@ -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; diff --git a/hid-agent/bluetooth-hid-agent.c b/hid-agent/bluetooth-hid-agent.c index f1790c1..fcf5e01 100644 --- a/hid-agent/bluetooth-hid-agent.c +++ b/hid-agent/bluetooth-hid-agent.c @@ -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");