diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-09 15:43:56 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-09 15:43:56 +0000 |
commit | daf4fb951bf8493b3425f24beb7eb1a6c36f838a (patch) | |
tree | 7575e0dab8180279947266c8e72b41b3797e20d2 /editeng | |
parent | ecfeb72252c18c7fc94170e19a1ca6aba4116e72 (diff) |
coverity#1169827 Explicit null dereferenced
Change-Id: Iaca51f3795341c1c834772abba340501b3fc60a3
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index e1240215f7ad..8bfefb3d8638 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -2254,6 +2254,10 @@ sal_Int32 ImpEditEngine::SplitTextPortion( ParaPortion* pPortion, sal_Int32 nPos } DBG_ASSERT( pTextPortion, "Position outside the area!" ); + + if (!pTextPortion) + return 0; + DBG_ASSERT( pTextPortion->GetKind() == PORTIONKIND_TEXT, "SplitTextPortion: No TextPortion!" ); sal_Int32 nOverlapp = nTmpPos - nPos; |