diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2012-02-11 17:34:20 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2012-02-11 17:36:27 +0100 |
commit | fef3122259092e03b3cf11721171d4b621c3a97f (patch) | |
tree | dea6871b069a166a492268e0ebd73a39e3604cd6 /linguistic | |
parent | 0f4451c0b3bda3d14c7672ca670b4de959495365 (diff) |
Avoid Possible null pointer dereference in linguistic/source/spelldsp.hxx
(Thank you to Ivan and Riccardo for their suggestions)
Diffstat (limited to 'linguistic')
-rw-r--r-- | linguistic/source/spelldsp.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/linguistic/source/spelldsp.hxx b/linguistic/source/spelldsp.hxx index 9ae9cd45456b..e2186f96ddad 100644 --- a/linguistic/source/spelldsp.hxx +++ b/linguistic/source/spelldsp.hxx @@ -73,7 +73,7 @@ class SpellCheckerDispatcher : ::com::sun::star::linguistic2::XSearchableDictionaryList > xDicList; LngSvcMgr &rMgr; - linguistic::SpellCache *pCache; // Spell Cache (holds known words) + mutable linguistic::SpellCache *pCache; // Spell Cache (holds known words) // disallow copy-constructor and assignment-operator for now SpellCheckerDispatcher(const SpellCheckerDispatcher &); @@ -134,7 +134,7 @@ public: inline linguistic::SpellCache & SpellCheckerDispatcher::GetCache() const { if (!pCache) - ((SpellCheckerDispatcher *) this)->pCache = new linguistic::SpellCache(); + pCache = new linguistic::SpellCache(); return *pCache; } |