Kaydet (Commit) a26723f0 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Miklos Vajna

Related: tdf#92392 clear workwins that point to pWindow

before trying to destroy pWindow

Change-Id: I7257096e8da2a5d6753ad2091287d63ea9ae244b
(cherry picked from commit 3c6eec0d)
Reviewed-on: https://gerrit.libreoffice.org/16832Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst f932f119
......@@ -163,6 +163,8 @@ private:
GetContext() const
{ return pContext; }
SAL_DLLPRIVATE void ClearWorkwin();
protected:
SfxChildWindow(vcl::Window *pParentWindow, sal_uInt16 nId);
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment