diff --git a/frameworks/kits/js/common/image_source_napi.cpp b/frameworks/kits/js/common/image_source_napi.cpp index 0514b7cc15cbaa1da5b703adbdb53d289aec3c20..2cc49edc2810795d6f7913043c8247ab3aca133f 100644 --- a/frameworks/kits/js/common/image_source_napi.cpp +++ b/frameworks/kits/js/common/image_source_napi.cpp @@ -418,6 +418,8 @@ napi_value ImageSourceNapi::Constructor(napi_env env, napi_callback_info info) void ImageSourceNapi::Destructor(napi_env env, void *nativeObject, void *finalize) { + reinterpret_cast(nativeObject)->nativeImgSrc = nullptr; + HiLog::Info(LABEL, "ImageSourceNapi::Destructor"); } napi_value ImageSourceNapi::GetSupportedFormats(napi_env env, napi_callback_info info)