mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-27 01:03:08 +00:00
!36042 修复ContentSlot新增\删除\插入空节点闪退问题
Merge pull request !36042 from lanshouren/work_0619
This commit is contained in:
commit
5ee551ca0c
@ -672,6 +672,7 @@ int32_t OH_ArkUI_NodeContent_AddNode(ArkUI_NodeContentHandle content, ArkUI_Node
|
||||
{
|
||||
auto* impl = OHOS::Ace::NodeModel::GetFullImpl();
|
||||
CHECK_NULL_RETURN(impl, OHOS::Ace::ERROR_CODE_NATIVE_IMPL_LIBRARY_NOT_FOUND);
|
||||
CHECK_NULL_RETURN(node, OHOS::Ace::ERROR_CODE_PARAM_INVALID);
|
||||
return impl->getNodeModifiers()->getNodeContentModifier()->addChild(
|
||||
reinterpret_cast<ArkUINodeContentHandle>(content), node->uiNodeHandle);
|
||||
}
|
||||
@ -680,6 +681,7 @@ int32_t OH_ArkUI_NodeContent_InsertNode(ArkUI_NodeContentHandle content, ArkUI_N
|
||||
{
|
||||
auto* impl = OHOS::Ace::NodeModel::GetFullImpl();
|
||||
CHECK_NULL_RETURN(impl, OHOS::Ace::ERROR_CODE_NATIVE_IMPL_LIBRARY_NOT_FOUND);
|
||||
CHECK_NULL_RETURN(node, OHOS::Ace::ERROR_CODE_PARAM_INVALID);
|
||||
return impl->getNodeModifiers()->getNodeContentModifier()->insertChild(
|
||||
reinterpret_cast<ArkUINodeContentHandle>(content), node->uiNodeHandle, position);
|
||||
}
|
||||
@ -688,6 +690,7 @@ int32_t OH_ArkUI_NodeContent_RemoveNode(ArkUI_NodeContentHandle content, ArkUI_N
|
||||
{
|
||||
auto* impl = OHOS::Ace::NodeModel::GetFullImpl();
|
||||
CHECK_NULL_RETURN(impl, OHOS::Ace::ERROR_CODE_NATIVE_IMPL_LIBRARY_NOT_FOUND);
|
||||
CHECK_NULL_RETURN(node, OHOS::Ace::ERROR_CODE_PARAM_INVALID);
|
||||
return impl->getNodeModifiers()->getNodeContentModifier()->removeChild(
|
||||
reinterpret_cast<ArkUINodeContentHandle>(content), node->uiNodeHandle);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user