diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-04-24 15:25:20 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-04-24 17:16:40 +0100 |
commit | fcb21dee9b223d8e48860d43865b7887c1473f79 (patch) | |
tree | 3b5e6192956396310331726d5363e35ef1617f3c /editeng | |
parent | c803bd811c6d2e64173d353106f850f6308e5bb7 (diff) |
coverity#735746 Explicit null dereferenced
Change-Id: I62c329a8d2ad50293870a3ff38866cf516551338
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 81026b4b4082..bf25c261bb82 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -4542,9 +4542,11 @@ void ImpEditEngine::ImplExpandCompressedPortions( EditLine* pLine, ParaPortion* DBG_ASSERT( nTxtPortionStart >= pLine->GetStart(), "Portion doesn't belong to the line!!!" ); sal_Int32* pDXArray = NULL; if (!pLine->GetCharPosArray().empty()) + { pDXArray = &pLine->GetCharPosArray()[0]+( nTxtPortionStart-pLine->GetStart() ); - if ( pTP->GetExtraInfos()->pOrgDXArray ) - memcpy( pDXArray, pTP->GetExtraInfos()->pOrgDXArray, (pTP->GetLen()-1)*sizeof(sal_Int32) ); + if ( pTP->GetExtraInfos()->pOrgDXArray ) + memcpy( pDXArray, pTP->GetExtraInfos()->pOrgDXArray, (pTP->GetLen()-1)*sizeof(sal_Int32) ); + } ImplCalcAsianCompression( pParaPortion->GetNode(), pTP, nTxtPortionStart, pDXArray, (sal_uInt16)nCompressPercent, true ); } } |