From f5ce2df24a91796d6b8c732ad1a8ab3c5f736cde Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 1 Sep 2022 11:28:31 +0100 Subject: cid#1500537 silence Dereference after null check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CreateView never return a null/empty Change-Id: I55829aff18f6ea3d508cfbd101ebcbf09ff37295 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139156 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sd/source/ui/framework/factories/BasicViewFactory.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sd') diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx b/sd/source/ui/framework/factories/BasicViewFactory.cxx index 425cb44467f8..5e862c6aebc2 100644 --- a/sd/source/ui/framework/factories/BasicViewFactory.cxx +++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx @@ -163,8 +163,7 @@ Reference SAL_CALL BasicViewFactory::createResource ( pDescriptor = CreateView(rxViewId, *pFrame, *pWindow, xPane, pFrameView, bIsCenterPane); } - if (pDescriptor != nullptr) - xView = pDescriptor->mxView; + xView = pDescriptor->mxView; mpViewShellContainer->push_back(pDescriptor); -- cgit