[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Thu Jun 16 13:19:24 UTC 2016


 sw/source/uibase/app/apphdl.cxx |   17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

New commits:
commit f04c48a7e764775bdd98715e5d17845f1786bd44
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jun 16 14:17:42 2016 +0100

    Resolves: tdf#100422 crash if you exit mail merge wizard...
    
    after loading previous document or template
    
    Change-Id: I3bdd1159e367b0297aee84763bf5c4312e9e91fa

diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 8f93cdb4..9bc5ec1 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();


More information about the Libreoffice-commits mailing list