fix: code check

Signed-off-by: dinghong <dinghong10@huawei.com>
Change-Id: Ic2b7aaeafdef24c355609c75c097b70596fe4753
This commit is contained in:
dinghong 2024-06-25 11:37:49 +08:00
parent 69ebf6c7a2
commit 33c420b004

View File

@ -134,6 +134,9 @@ int32_t WindowManagerImpl::FindWindow(std::string name, int64_t& windowId)
return static_cast<int32_t>(WmErrorCode::WM_ERROR_STATE_ABNORMALLY);
} else {
sptr<CJWindowImpl> newWindow = CreateCjWindowObject(window);
if (newWindow == nullptr) {
return static_cast<int32_t>(WmErrorCode::WM_ERROR_STATE_ABNORMALLY);
}
windowId = newWindow->GetID();
return WINDOW_SUCCESS;
}