summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/childwin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/appl/childwin.cxx')
-rw-r--r--sfx2/source/appl/childwin.cxx17
1 files changed, 11 insertions, 6 deletions
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 0b41d4301985..35e53d6e8892 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;