[Libreoffice-commits] core.git: editeng/source
Tomaž Vajngerl
quikee at gmail.com
Wed Sep 11 04:11:30 PDT 2013
editeng/source/editeng/editeng.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 80503eb9b5d82a2142feb91b1b0ec3175571de0a
Author: Tomaž Vajngerl <quikee at gmail.com>
Date: Wed Sep 11 13:06:30 2013 +0200
Prevent crash: pNode->GetWrongList() can return NULL
Change-Id: If3363271f72dae7581ac41542f890eaebed38e6c
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 8e8e15f..6b7538d 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 )
More information about the Libreoffice-commits
mailing list