mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-27 01:03:08 +00:00
!46354 【健壮性】imageAILoader
Merge pull request !46354 from 吴寅潇/fixImageAiCrash
This commit is contained in:
commit
430cfa3733
@ -63,6 +63,10 @@ ImageAnalyzerInstance ImageAnalyzerLoader::CreateImageAnalyzer()
|
||||
return {};
|
||||
}
|
||||
auto engine = OHOS::Ace::EngineHelper::GetCurrentEngine();
|
||||
if (!engine) {
|
||||
TAG_LOGW(AceLogTag::ACE_IMAGE, "ImageAnalyzer Create engine null.");
|
||||
return {};
|
||||
}
|
||||
NativeEngine* nativeEngine = engine->GetNativeEngine();
|
||||
auto env = reinterpret_cast<napi_env>(nativeEngine);
|
||||
return { createImageAnalyzerInstance_(env), [lib = shared_from_this(),
|
||||
|
Loading…
Reference in New Issue
Block a user