summaryrefslogtreecommitdiff
path: root/sw/source/uibase/app/apphdl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/app/apphdl.cxx')
-rw-r--r--sw/source/uibase/app/apphdl.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 8d575cc80672..00a9f81b9718 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -382,7 +382,7 @@ class SwMailMergeWizardExecutor : public salhelper::SimpleReferenceObject
{
SwView* m_pView; // never owner
SwView* m_pView2Close; // never owner
- AbstractMailMergeWizard* m_pWizard; // always owner
+ VclPtr<AbstractMailMergeWizard> m_pWizard; // always owner
bool m_bDestroyMMToolbarOnCancel;
DECL_LINK( EndDialogHdl, Dialog&, void );
@@ -611,15 +611,15 @@ IMPL_LINK_NOARG( SwMailMergeWizardExecutor, EndDialogHdl, Dialog&, void )
IMPL_LINK_NOARG(SwMailMergeWizardExecutor, DestroyDialogHdl, void*, void)
{
- delete m_pWizard;
- m_pWizard = nullptr;
+ m_pWizard.disposeAndClear();
release();
}
IMPL_STATIC_LINK(SwMailMergeWizardExecutor, DestroyWizardHdl, void*, pDialog, void )
{
- delete static_cast<AbstractMailMergeWizard*>(pDialog);
+ VclPtr<AbstractMailMergeWizard> p = static_cast<AbstractMailMergeWizard*>(pDialog);
+ p.disposeAndClear();
}
IMPL_LINK_NOARG(SwMailMergeWizardExecutor, CancelHdl, void*, void)
@@ -653,8 +653,7 @@ IMPL_LINK_NOARG(SwMailMergeWizardExecutor, CancelHdl, void*, void)
xMMConfig->Commit();
}
- delete m_pWizard;
- m_pWizard = nullptr;
+ m_pWizard.disposeAndClear();
release();
}