From ac251cbf4620e4f380b4bafe976bfc04c7d0753f Mon Sep 17 00:00:00 2001 From: chyyy Date: Sat, 22 Jan 2022 16:03:02 +0800 Subject: [PATCH] delete context nullptr protect Signed-off-by: chyyy Change-Id: I9274fbc7825f720c3e7bfb0e4dcdf4483a1a63eb Signed-off-by: chyyy Change-Id: I92b31e743b3e6ab4071354fbbe0966fe1586f08e --- wm/src/window_impl.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/wm/src/window_impl.cpp b/wm/src/window_impl.cpp index 822f3174..ccf4ae72 100644 --- a/wm/src/window_impl.cpp +++ b/wm/src/window_impl.cpp @@ -203,10 +203,6 @@ WMError WindowImpl::SetUIContent(const std::string& contentInfo, NativeEngine* engine, NativeValue* storage, bool isdistributed) { WLOGFI("SetUIContent"); - if (context_.get() == nullptr) { - WLOGFE("SetUIContent context_ is nullptr id: %{public}d", property_->GetWindowId()); - return WMError::WM_ERROR_NULLPTR; - } WLOGFI("contentInfo: %{public}s, context_:%{public}p", contentInfo.c_str(), context_.get()); uiContent_ = Ace::UIContent::Create(context_.get(), engine); if (uiContent_ == nullptr) {