Description: 空指针处理

Feature or Bugfix: Bugfix
Binary Source: NO

Signed-off-by: chenshuai <chenshuai3@huawei.com>
This commit is contained in:
chenshuai 2024-06-06 16:45:20 +08:00
parent 7a13afc887
commit d4423cd8d1

View File

@ -35,6 +35,7 @@ ErrCode AdLoadSendRequestProxy::SendAdLoadRequest(const sptr<AdRequestData> &req
{
if (callback == nullptr) {
ADS_HILOGI(OHOS::Cloud::ADS_MODULE_SERVICE, "callback is null");
return ERR_AD_COMMON_NAPI_CALLBACK_NULL_ERROR;
}
MessageParcel data;
if (!data.WriteRemoteObject(callback->AsObject())) {