Revert "[Bluetooth][OTP-Client] Handle GATT operations for OTP"
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / bt-service-otp.c
index 86354c0..c46edfa 100644 (file)
@@ -119,10 +119,12 @@ void server_init_cb(GObject *object, GAsyncResult *res,
        out_param = g_variant_new_from_data((const GVariantType *)"i",
                                result, sizeof(int), TRUE, NULL, NULL);
 
-       g_dbus_method_invocation_return_value(req_info->context,
+       if (req_info) {
+               g_dbus_method_invocation_return_value(req_info->context,
                                g_variant_new("(iv)", status, out_param));
 
-       _bt_delete_request_list(req_info->req_id);
+               _bt_delete_request_list(req_info->req_id);
+       }
        g_variant_unref(result);
 }