diff options
-rw-r--r-- | editeng/source/editeng/editeng.cxx | 4 |
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 ) |