mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 23:21:05 +00:00
nullptr check
Signed-off-by: chensiyi_CE <chensiyi12@huawei.com>
This commit is contained in:
parent
f6e00539bf
commit
ecb04a16d1
@ -21,9 +21,9 @@
|
||||
namespace OHOS::Ace::Framework {
|
||||
void RemoteWindowModelImpl::Create(const std::shared_ptr<OHOS::Rosen::RSNode>& rsNode)
|
||||
{
|
||||
auto* specializedComponent = AceType::MakeRefPtr<OHOS::Ace::RemoteWindowComponent>();
|
||||
auto specializedComponent = AceType::MakeRefPtr<OHOS::Ace::RemoteWindowComponent>();
|
||||
CHECK_NULL_VOID(specializedComponent);
|
||||
auto stack = ViewStackProcessor::GetInstance();
|
||||
auto* stack = ViewStackProcessor::GetInstance();
|
||||
CHECK_NULL_VOID(stack);
|
||||
stack->Push(specializedComponent);
|
||||
specializedComponent->SetExternalRSNode(rsNode);
|
||||
|
@ -27,9 +27,9 @@ void RemoteWindowModelNG::Create(const std::shared_ptr<OHOS::Rosen::RSNode>& rsN
|
||||
ACE_LAYOUT_SCOPED_TRACE("Create[%s][self:%d]", V2::REMOTE_WINDOW_ETS_TAG, nodeId);
|
||||
auto frameNode = FrameNode::GetOrCreateFrameNode(
|
||||
V2::REMOTE_WINDOW_ETS_TAG, nodeId, []() { return AceType::MakeRefPtr<RemoteWindowPattern>(); });
|
||||
CHECK_NULL_VOID(frameNode);
|
||||
stack->Push(frameNode);
|
||||
#ifdef ENABLE_ROSEN_BACKEND
|
||||
CHECK_NULL_VOID(frameNode);
|
||||
auto context = AceType::DynamicCast<NG::RosenRenderContext>(frameNode->GetRenderContext());
|
||||
CHECK_NULL_VOID(context);
|
||||
context->SetRSNode(rsNode);
|
||||
|
Loading…
Reference in New Issue
Block a user