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");