summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-06-16 14:17:42 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-06-16 14:20:02 +0100
commitbe42adb962f9bf66f353d16dadc984d265bf3560 (patch)
treee2e3d93202b0c31114739d7cbcb8c546c05ffda3 /sw
parent81ed73d0867e0322b450314c474fd01404671f0e (diff)
Resolves: tdf#100422 crash if you exit mail merge wizard...
after loading previous document or template Change-Id: I3bdd1159e367b0297aee84763bf5c4312e9e91fa (cherry picked from commit f04c48a7e764775bdd98715e5d17845f1786bd44)
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/app/apphdl.cxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 8f93cdb42cc7..9bc5ec11cec6 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -592,16 +592,19 @@ IMPL_STATIC_LINK_TYPED(SwMailMergeWizardExecutor, DestroyWizardHdl, void*, pDial
IMPL_LINK_NOARG_TYPED(SwMailMergeWizardExecutor, CancelHdl, void*, void)
{
- SwMailMergeConfigItem* pMMConfig = m_pView->GetMailMergeConfigItem();
- if (pMMConfig->GetTargetView())
+ if (SwMailMergeConfigItem* pMMConfig = m_pView->GetMailMergeConfigItem())
{
- pMMConfig->GetTargetView()->GetViewFrame()->DoClose();
- pMMConfig->SetTargetView(nullptr);
+ if (pMMConfig->GetTargetView())
+ {
+ pMMConfig->GetTargetView()->GetViewFrame()->DoClose();
+ pMMConfig->SetTargetView(nullptr);
+ }
+ if (pMMConfig->GetSourceView())
+ pMMConfig->GetSourceView()->GetViewFrame()->GetFrame().AppearWithUpdate();
+
+ pMMConfig->Commit();
}
- if (pMMConfig->GetSourceView())
- pMMConfig->GetSourceView()->GetViewFrame()->GetFrame().AppearWithUpdate();
- pMMConfig->Commit();
delete m_pWizard;
m_pWizard = nullptr;
release();