mirror of
https://gitee.com/openharmony/notification_common_event_service
synced 2024-11-27 02:01:12 +00:00
!1149 解引用nullptr告警处理
Merge pull request !1149 from stepend98/cherry-pick-1727058599
This commit is contained in:
commit
280218b809
@ -133,6 +133,10 @@ void JsStaticSubscriberExtension::ExecNapiWrap(napi_env env, napi_value obj)
|
||||
napi_value contextObj = CreateJsStaticSubscriberExtensionContext(env, context);
|
||||
auto shellContextRef = AbilityRuntime::JsRuntime::LoadSystemModuleByEngine(
|
||||
env, "application.StaticSubscriberExtensionContext", &contextObj, ARGC_ONE);
|
||||
if (shellContextRef == nullptr) {
|
||||
EVENT_LOGE("Failed to get shell context reference");
|
||||
return;
|
||||
}
|
||||
napi_value nativeObj = shellContextRef->GetNapiValue();
|
||||
if (nativeObj == nullptr) {
|
||||
EVENT_LOGE("Failed to get context native object");
|
||||
|
Loading…
Reference in New Issue
Block a user