diff --git a/frameworks/native/runtime/js_runtime.cpp b/frameworks/native/runtime/js_runtime.cpp index 2059ad09d0..5e5702c549 100644 --- a/frameworks/native/runtime/js_runtime.cpp +++ b/frameworks/native/runtime/js_runtime.cpp @@ -551,7 +551,7 @@ void JsRuntime::Deinitialize() auto uvLoop = nativeEngine_->GetUVLoop(); auto fd = uvLoop != nullptr ? uv_backend_fd(uvLoop) : -1; - if (fd >= 0) { + if (fd >= 0 && eventHandler_ != nullptr) { eventHandler_->RemoveFileDescriptorListener(fd); } RemoveTask(TIMER_TASK); diff --git a/frameworks/native/runtime/utils/src/runtime_extractor.cpp b/frameworks/native/runtime/utils/src/runtime_extractor.cpp index db37588813..432d116e0e 100644 --- a/frameworks/native/runtime/utils/src/runtime_extractor.cpp +++ b/frameworks/native/runtime/utils/src/runtime_extractor.cpp @@ -60,7 +60,7 @@ std::shared_ptr RuntimeExtractor::Create(const std::string& ha } std::shared_ptr runtimeExtractor = std::make_shared(loadPath); if (!runtimeExtractor->Init()) { - HILOG_ERROR("RuntimeExtractor create failed"); + HILOG_ERROR("RuntimeExtractor create failed for %{public}s", loadPath.c_str()); return nullptr; }