include/sfx2/childwin.hxx | 2 ++ sfx2/source/appl/childwin.cxx | 17 +++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-)
New commits: commit a26723f028a9795104e12b5f98cddb53471b44d2 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jul 7 13:47:14 2015 +0100 Related: tdf#92392 clear workwins that point to pWindow before trying to destroy pWindow Change-Id: I7257096e8da2a5d6753ad2091287d63ea9ae244b (cherry picked from commit 3c6eec0d99a2bb84bd6719ad498d5de54dc959fe) Reviewed-on: https://gerrit.libreoffice.org/16832 Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> Tested-by: Miklos Vajna <vmik...@collabora.co.uk> diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx index eb43f8e..7214005 100644 --- a/include/sfx2/childwin.hxx +++ b/include/sfx2/childwin.hxx @@ -163,6 +163,8 @@ private: GetContext() const { return pContext; } + SAL_DLLPRIVATE void ClearWorkwin(); + protected: SfxChildWindow(vcl::Window *pParentWindow, sal_uInt16 nId); diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx index 0b41d43..35e53d6 100644 --- a/sfx2/source/appl/childwin.cxx +++ b/sfx2/source/appl/childwin.cxx @@ -177,12 +177,7 @@ void SfxChildWindow::Destroy() { if ( GetFrame().is() ) { - if (pImp->pWorkWin) - { - if (pImp->pWorkWin->GetActiveChild_Impl() == pWindow) - pImp->pWorkWin->SetActiveChild_Impl(NULL); - pImp->pWorkWin = NULL; - } + ClearWorkwin(); try { ::com::sun::star::uno::Reference < ::com::sun::star::util::XCloseable > xClose( GetFrame(), ::com::sun::star::uno::UNO_QUERY ); @@ -199,11 +194,21 @@ void SfxChildWindow::Destroy() delete this; } +void SfxChildWindow::ClearWorkwin() +{ + if (pImp->pWorkWin) + { + if (pImp->pWorkWin->GetActiveChild_Impl() == pWindow) + pImp->pWorkWin->SetActiveChild_Impl(NULL); + pImp->pWorkWin = NULL; + } +} SfxChildWindow::~SfxChildWindow() { delete pContext; pContext = NULL; + ClearWorkwin(); pWindow.disposeAndClear(); delete pImp; pImp = NULL;
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits