From 469660d450a310740abb696806c6410a17733fad Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 17 May 2011 11:13:55 +0100 Subject: guard final release better post possible clear --- lingucomponent/source/spellcheck/spell/sspellimp.cxx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'lingucomponent/source') diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index 82de2a919..3a9854b72 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -76,8 +76,8 @@ using ::rtl::OString; /////////////////////////////////////////////////////////////////////////// -SpellChecker::SpellChecker() : - aEvtListeners ( GetLinguMutex() ) +SpellChecker::SpellChecker() + : aEvtListeners(GetLinguMutex()) { aDicts = NULL; aDEncs = NULL; @@ -88,31 +88,29 @@ SpellChecker::SpellChecker() : numdict = 0; } - SpellChecker::~SpellChecker() { if (aDicts) { - for (int i = 0; i < numdict; i++) + for (int i = 0; i < numdict; ++i) { - if (aDicts[i]) delete aDicts[i]; + delete aDicts[i]; aDicts[i] = NULL; } delete[] aDicts; } aDicts = NULL; numdict = 0; - if (aDEncs) delete[] aDEncs; + delete[] aDEncs; aDEncs = NULL; - if (aDLocs) delete[] aDLocs; + delete[] aDLocs; aDLocs = NULL; - if (aDNames) delete[] aDNames; + delete[] aDNames; aDNames = NULL; - if (pPropHelper) + if (xPropHelper.is()) pPropHelper->RemoveAsPropListener(); } - PropertyHelper_Spell & SpellChecker::GetPropHelper_Impl() { if (!pPropHelper) -- cgit v1.2.3