Add the exception handling logic for TC
[platform/core/connectivity/bluetooth-agent.git] / hid-agent / bluetooth-hid-agent.c
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");