description

Signed-off-by: 小发发 <lianghui35@huawei.com>
This commit is contained in:
小发发 2024-08-22 22:06:40 +08:00
parent 4e4d5878bc
commit 2028fa9f7a
2 changed files with 4 additions and 4 deletions

View File

@ -481,7 +481,7 @@ bool NAccessibilityElement::CheckElementInfoParameter(NAccessibilityElementData
HILOG_ERROR("callbackInfo is nullptr");
return false;
}
if (callbackInfo == nullptr->accessibilityElement_.elementInfo_) {
if (!callbackInfo->accessibilityElement_.elementInfo_) {
HILOG_ERROR("element info is nullptr");
napi_get_undefined(callbackInfo->env_, &value);
callbackInfo->ret_ = RET_ERR_FAILED;
@ -1363,7 +1363,7 @@ bool NAccessibilityElement::CheckWindowInfoParameter(NAccessibilityElementData *
HILOG_ERROR("callbackInfo is nullptr");
return false;
}
if (callbackInfo == nullptr->accessibilityElement_.windowInfo_) {
if (!callbackInfo->accessibilityElement_.windowInfo_) {
HILOG_ERROR("window info is nullptr");
napi_get_undefined(callbackInfo->env_, &value);
callbackInfo->ret_ = RET_ERR_FAILED;
@ -1491,7 +1491,7 @@ napi_value NAccessibilityElement::ActionNames(napi_env env, napi_callback_info i
return ErrorOperation(callbackInfo);
}
callbackInfo->accessibilityElement_ = *accessibilityElement;
if (callbackInfo == nullptr->accessibilityElement_.isElementInfo_) {
if (!callbackInfo->accessibilityElement_.isElementInfo_) {
HILOG_ERROR("it is not element info");
return ErrorOperation(callbackInfo);
}

View File

@ -565,7 +565,7 @@ napi_value NAccessibilityClient::SendAccessibilityEvent(napi_env env, napi_callb
if (errCode == OHOS::Accessibility::RET_OK) {
callbackInfo->result_ = ConvertEventInfoJSToNAPI(env, parameters[0], callbackInfo->eventInfo_);
if (callbackInfo == nullptr->result_) {
if (!callbackInfo->result_) {
errCode = OHOS::Accessibility::RET_ERR_INVALID_PARAM;
}
}