diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-01-29 11:34:53 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-01-29 13:23:55 +0000 |
commit | bb5328e587f275d003ffd126abd827a59c985322 (patch) | |
tree | 9d0c5186f9e2725f01b6f60d0845fc847fa366db | |
parent | cdd1d19406726c9cbeb9969b99dc03cadbaf1050 (diff) |
coverity#1158124 Dereference after null check
Change-Id: Ifc2d668b4dda3bc6f8a1aec97a2b9031d3cbd2e9
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index df451a3f3847..c16adb7806bb 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -1182,10 +1182,10 @@ sal_Bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) nTmpPortion++; nPortionEnd = nTmpPortion; // one Non-Feature-Portion has to be wrapped - if ( pPortion->GetLen() > 1 ) + if ( pPortion && pPortion->GetLen() > 1 ) { - DBG_ASSERT( pPortion && (pPortion->GetKind() == PORTIONKIND_TEXT), "Len>1, but no TextPortion?" ); - nTmpWidth -= pPortion ? pPortion->GetSize().Width() : 0; + DBG_ASSERT( pPortion->GetKind() == PORTIONKIND_TEXT, "Len>1, but no TextPortion?" ); + nTmpWidth -= pPortion->GetSize().Width(); sal_uInt16 nP = SplitTextPortion( pParaPortion, nTmpPos, pLine ); const TextPortion* p = pParaPortion->GetTextPortions()[nP]; DBG_ASSERT( p, "Portion ?!" ); |