summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorTomaž Vajngerl <quikee@gmail.com>2013-09-11 13:06:30 +0200
committerTomaž Vajngerl <quikee@gmail.com>2013-09-11 13:10:59 +0200
commit80503eb9b5d82a2142feb91b1b0ec3175571de0a (patch)
treefd60fc1c8a1b720eb6b323285d515983aba85b35 /editeng
parent7cfd041c13ef3fdd2a597d4b862a6ceb884f7806 (diff)
Prevent crash: pNode->GetWrongList() can return NULL
Change-Id: If3363271f72dae7581ac41542f890eaebed38e6c
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editeng.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 8e8e15f91574..6b7538d636b5 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -1976,7 +1976,9 @@ void EditEngine::SetControlWord( sal_uInt32 nWord )
{
ContentNode* pNode = pImpEditEngine->GetEditDoc().GetObject( n );
const ParaPortion* pPortion = pImpEditEngine->GetParaPortions()[n];
- bool bWrongs = ( bSpellingChanged || ( nWord & EE_CNTRL_ONLINESPELLING ) ) ? !pNode->GetWrongList()->empty() : false;
+ bool bWrongs = false;
+ if (pNode->GetWrongList() != NULL && ( bSpellingChanged || ( nWord & EE_CNTRL_ONLINESPELLING ) ))
+ bWrongs = !pNode->GetWrongList()->empty();
if ( bSpellingChanged )
pNode->DestroyWrongList();
if ( bWrongs )