include/svx/srchdlg.hxx | 1 + sfx2/source/appl/workwin.cxx | 2 +- sfx2/source/dialog/basedlgs.cxx | 2 +- svx/source/dialog/srchdlg.cxx | 7 ++++++- 4 files changed, 9 insertions(+), 3 deletions(-)
New commits: commit 2c7a102df90bd051d34fa9100979d1a0d6341576 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Mar 25 09:43:13 2019 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Mar 25 14:43:03 2019 +0100 ubsan detect null deref Change-Id: I78a8c91f2c7493a12f5acb325c3f79efbbfbffcc Reviewed-on: https://gerrit.libreoffice.org/69650 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx index 0db2bfd0e7a2..d84a626e213f 100644 --- a/include/svx/srchdlg.hxx +++ b/include/svx/srchdlg.hxx @@ -121,6 +121,7 @@ public: virtual ~SvxSearchDialog() override; virtual void EndDialog() override; + virtual void ChildWinDispose() override; virtual void Close() override; // Window 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(); } } diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index f5a809ed3c5c..a3b74d15dfe7 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -340,13 +340,18 @@ SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, SfxChildWindow* pChildWi Construct_Impl(); } -SvxSearchDialog::~SvxSearchDialog() +void SvxSearchDialog::ChildWinDispose() { rBindings.EnterRegistrations(); pSearchController.reset(); pOptionsController.reset(); pFamilyController.reset(); rBindings.LeaveRegistrations(); + SfxModelessDialogController::ChildWinDispose(); +} + +SvxSearchDialog::~SvxSearchDialog() +{ } void SvxSearchDialog::Construct_Impl() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits