diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-06-16 14:17:42 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-06-16 14:18:57 +0100 |
commit | f04c48a7e764775bdd98715e5d17845f1786bd44 (patch) | |
tree | bddb5136cf7a02891db375b1da965a587a951a04 | |
parent | 8132c691dea66f9e402161ff8fac8e31f313b72d (diff) |
Resolves: tdf#100422 crash if you exit mail merge wizard...
after loading previous document or template
Change-Id: I3bdd1159e367b0297aee84763bf5c4312e9e91fa
-rw-r--r-- | sw/source/uibase/app/apphdl.cxx | 17 |
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(); |