!37757 添加判空保护

Merge pull request !37757 from luoying_ace/ly0711
This commit is contained in:
openharmony_ci 2024-07-20 08:34:58 +00:00 committed by Gitee
commit f708967784
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -549,6 +549,7 @@ void SubwindowManager::HideDialogSubWindow(int32_t instanceId)
auto subwindow = GetSubwindow(instanceId >= MIN_SUBCONTAINER_ID ? GetParentContainerId(instanceId) : instanceId);
CHECK_NULL_VOID(subwindow);
auto overlay = subwindow->GetOverlayManager();
CHECK_NULL_VOID(overlay);
if (overlay->GetDialogMap().size() == 0) {
subwindow->HideSubWindowNG();
}