!44196 CodeCheck fix

Merge pull request !44196 from 陈一阁/res_fix
This commit is contained in:
openharmony_ci 2024-09-26 09:55:12 +00:00 committed by Gitee
commit b306952d39
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 2 additions and 0 deletions

View File

@ -79,6 +79,7 @@ UINode::~UINode()
void UINode::AttachContext(PipelineContext* context, bool recursive)
{
CHECK_NULL_VOID(context);
context_ = context;
instanceId_ = context->GetInstanceId();
if (updateJSInstanceCallback_) {

View File

@ -282,6 +282,7 @@ void PreFixEmptyBundleName(napi_env env, napi_value value)
NapiStringToString(env, bundleNameNApi, bundleName);
if (bundleName.empty()) {
auto container = Container::CurrentSafely();
CHECK_NULL_VOID(container);
bundleName = container->GetBundleName();
bundleNameNApi = CreateNapiString(env, bundleName);
napi_set_named_property(env, value, BUNDLE_NAME, bundleNameNApi);