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

Michael Stahl mstahl at redhat.com
Wed Nov 12 15:38:01 PST 2014


 editeng/source/misc/acorrcfg.cxx  |    6 +++---
 sw/source/uibase/app/swmodule.cxx |    3 +++
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 5bff4b016c4b44f4123e0e6a4fd4c0c4dc0cfa2d
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Nov 12 23:57:07 2014 +0100

    sw: delete global SwAutoCorrect instance to avoid crash...
    
    ... in exit handlers because VCL and the SolarMutex is gone.
    
    (regression from 4404b718bdb547cb9b7b17c73a53574724cdeeb7)
    
    Change-Id: I9f33b2cb8c87f7137e3ba0ae033879861f9fe11b

diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx
index de1805a..dce7df4 100644
--- a/editeng/source/misc/acorrcfg.cxx
+++ b/editeng/source/misc/acorrcfg.cxx
@@ -77,11 +77,11 @@ SvxAutoCorrCfg::~SvxAutoCorrCfg()
     delete pAutoCorrect;
 }
 
-void SvxAutoCorrCfg::SetAutoCorrect( SvxAutoCorrect* pNew )
+void SvxAutoCorrCfg::SetAutoCorrect(SvxAutoCorrect *const pNew)
 {
-    if( pNew && pNew != pAutoCorrect )
+    if (pNew != pAutoCorrect)
     {
-        if( pAutoCorrect->GetFlags() != pNew->GetFlags() )
+        if (pNew && (pAutoCorrect->GetFlags() != pNew->GetFlags()))
         {
             aBaseConfig.SetModified();
             aSwConfig.SetModified();
diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx
index ecee717..e3817b1 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -227,6 +227,9 @@ SwModule::~SwModule()
 {
     delete pErrorHdl;
     EndListening( *SfxGetpApp() );
+
+    SvxAutoCorrCfg& rACfg = SvxAutoCorrCfg::Get();
+    rACfg.SetAutoCorrect(0); // delete SwAutCorrect before exit handlers
 }
 
 void SwModule::CreateLngSvcEvtListener()


More information about the Libreoffice-commits mailing list