diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-07-03 11:47:21 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-03 12:49:40 +0100 |
commit | 4ce12cf8516e521ad8568a1a141d0505d5861947 (patch) | |
tree | 0954f1745dd4992893a83eb8e1f5789925e37eb5 /editeng | |
parent | aa356e6076aa3bedb7f7c5681270462edd1fb2dd (diff) |
coverity#738958 Unused pointer value
Change-Id: Ic0c7f1c3ccb17f11135facda9197f8dc82436549
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit2.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 91c6d1d51eec..f72f991a1d07 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -3303,12 +3303,11 @@ void ImpEditEngine::UpdateSelections() // taken into account! sal_Int32 nPara = rInf.GetPosition(); ParaPortion* pPPortion = GetParaPortions().SafeGetObject( nPara ); - if ( !pPPortion ) // Last paragraph + if (!GetParaPortions().SafeGetObject(nPara)) // Last paragraph { nPara = GetParaPortions().Count()-1; - pPPortion = GetParaPortions()[nPara]; } - OSL_ENSURE( pPPortion, "Empty Document in UpdateSelections ?" ); + assert(GetParaPortions()[nPara] && "Empty Document in UpdateSelections ?"); // Do not end up from a hidden paragraph: sal_Int32 nCurPara = nPara; sal_Int32 nLastPara = GetParaPortions().Count()-1; |