diff --git a/frameworks/inner/src/bluetooth_host.cpp b/frameworks/inner/src/bluetooth_host.cpp index a8a24bd5da8150cb19e65d229e75257ac223149d..3fc0d0bfbc7b33d1c97f9761dc742a63e19ea467 100644 --- a/frameworks/inner/src/bluetooth_host.cpp +++ b/frameworks/inner/src/bluetooth_host.cpp @@ -1272,6 +1272,7 @@ void BluetoothHost::Close(void) int32_t BluetoothHost::UpdateCloudBluetoothDevice(const std::vector &cloudDevices) { + CHECK_AND_RETURN_LOG_RET(IS_BT_ENABLED(), BT_ERR_INVALID_STATE, "bluetooth is off."); HILOGI("[CLOUD_DEV] UpdateCloudBluetoothDevice enter"); sptr proxy = GetRemoteProxy(BLUETOOTH_HOST); CHECK_AND_RETURN_LOG_RET(proxy != nullptr, BT_ERR_UNAVAILABLE_PROXY, "pimpl or bluetooth host is nullptr");