summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-03-25 09:43:13 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-03-25 14:43:03 +0100
commit2c7a102df90bd051d34fa9100979d1a0d6341576 (patch)
tree66f6d5be46c04b5375a4e5f42a5afc8b58675b45 /sfx2
parent2e28b198007b525ee66b9864677acdd8ff0d85c7 (diff)
ubsan detect null deref
Change-Id: I78a8c91f2c7493a12f5acb325c3f79efbbfbffcc Reviewed-on: https://gerrit.libreoffice.org/69650 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/workwin.cxx2
-rw-r--r--sfx2/source/dialog/basedlgs.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 8e86d0300ba3..4bc31eb3de44 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -583,7 +583,7 @@ void SfxWorkWindow::DeleteControllers_Impl()
// SplitWindow, cancel it at the workwindow.
// After TH a cancellation on the SplitWindow is not necessary
// since this window is also destroyed (see below).
- if (pCW->pCli)
+ if (pCW->pCli && pChild->GetWindow())
ReleaseChild_Impl(*pChild->GetWindow());
pCW->pWin = nullptr;
pWorkWin->GetSystemWindow()->GetTaskPaneList()->RemoveWindow( pChild->GetWindow() );
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 81ccb97b910e..b7174b1ff76d 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -63,7 +63,7 @@ public:
void SfxModelessDialog_Impl::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if( rHint.GetId() == SfxHintId::Dying) {
+ if (pMgr && rHint.GetId() == SfxHintId::Dying) {
pMgr->Destroy();
}
}