增加空指针判断(fix: prompt下的showActionMenu弹框切换成深色模式显示异常,和在深色模式下打开弹窗显示不一样);

Signed-off-by: zhangjinyu101 <zhangjinyu101@huawei.com>
This commit is contained in:
zhangjinyu101 2024-11-19 18:13:03 +08:00
parent 64885ddb62
commit 64517a622f

View File

@ -1329,8 +1329,10 @@ void DialogPattern::UpdateButtonsProperty()
UpdateButtonsPropertyForEachButton(buttonFrameNode, btnIndex);
++btnIndex;
}
} else if (menuNode_.Upgrade()) {
for (const auto& rowNode : menuNode_.Upgrade()->GetChildren()) {
} else {
auto upgradedMenuNode = menuNode_.Upgrade();
CHECK_NULL_VOID(upgradedMenuNode);
for (const auto& rowNode : upgradedMenuNode->GetChildren()) {
if (rowNode->GetTag() != V2::ROW_ETS_TAG) {
continue;
}