summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-11-12 23:57:07 +0100
committerMichael Stahl <mstahl@redhat.com>2014-11-13 00:32:13 +0100
commit5bff4b016c4b44f4123e0e6a4fd4c0c4dc0cfa2d (patch)
tree174fafeddb77ea676dd4a2fc342cd169d806dafa
parent2cfb2aaa5c55eeddd101d3a025e287fdc9a4766a (diff)
sw: delete global SwAutoCorrect instance to avoid crash...
... in exit handlers because VCL and the SolarMutex is gone. (regression from 4404b718bdb547cb9b7b17c73a53574724cdeeb7) Change-Id: I9f33b2cb8c87f7137e3ba0ae033879861f9fe11b
-rw-r--r--editeng/source/misc/acorrcfg.cxx6
-rw-r--r--sw/source/uibase/app/swmodule.cxx3
2 files changed, 6 insertions, 3 deletions
diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx
index de1805acc0c5..dce7df478b63 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 ecee71758f05..e3817b1061b5 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()