summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-10-02 20:39:37 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-10-03 15:36:39 +0200
commit2337f70a7631a5d644b123fcbbed375395daa666 (patch)
tree81543d5c040e84687293d88327b1f7bf891ced8f /sfx2/source
parentcb517e21f6e3728199e3ecbaf9a31fdf5316bd46 (diff)
cid#1492221 silence bogus Dereference after null check
Change-Id: I4e0554d16cac67bd8d829ed5e65fd4b17f4cf1b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123008 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/appl/childwin.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index f03489bf688d..09e97f6de3da 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -246,8 +246,11 @@ std::unique_ptr<SfxChildWindow> SfxChildWindow::CreateChildWindow( sal_uInt16 nI
}
}
- if ( pChild )
+ if (pChild)
+ {
+ assert(pFact && "pChild is returned by a call on pFact, so pFact cannot be null");
pChild->SetFactory_Impl( pFact );
+ }
DBG_ASSERT(pFact && (pChild || !rInfo.bVisible), "ChildWindow-Typ not registered!");