From 7bf18c0b9ce87b9363c50e2bd41182c829a3bbbe Mon Sep 17 00:00:00 2001 From: sizhenzhen Date: Thu, 11 Sep 2025 14:35:27 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E7=A0=81=E8=A7=84=E8=8C=83=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: sizhenzhen --- frameworks/js/napi/user_auth/src/user_auth_param_utils.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frameworks/js/napi/user_auth/src/user_auth_param_utils.cpp b/frameworks/js/napi/user_auth/src/user_auth_param_utils.cpp index 900c9d2ef..9c2e9a0de 100644 --- a/frameworks/js/napi/user_auth/src/user_auth_param_utils.cpp +++ b/frameworks/js/napi/user_auth/src/user_auth_param_utils.cpp @@ -91,6 +91,10 @@ UserAuthResultCode UserAuthParamUtils::InitAuthType(napi_env env, napi_value val napi_value jsValue = nullptr; napi_handle_scope scope = nullptr; napi_open_handle_scope(env, &scope); + if (scope == nullptr) { + IAM_LOGE("scope is invalid"); + continue; + } napi_get_element(env, value, i, &jsValue); if (jsValue == nullptr) { napi_close_handle_scope(env, scope); -- Gitee