diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-13 20:58:59 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-15 10:21:25 +0100 |
commit | 5c3eaed8acdd9d9677833547b2ab206574ee45b8 (patch) | |
tree | 309f05fcfd51a04e3a9b7ed00d410113eca26c7a /sw | |
parent | 6093787ceb22456f90cf6585cf24a57c67d019fb (diff) |
coverity#705490 Dereference null return value
Change-Id: Iac4178e7f751cba0b4a135dc9d840234d96ccfa2
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/frmedt/tblsel.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index ce5ad303dd9a..b4ae8009b19c 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -1712,7 +1712,8 @@ static void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart, { pTmpTab = pTmpTab->GetFollow(); rpStart = pTmpTab->FirstCell(); - while ( (rpStart->Frm().*fnRect->fnGetLeft)() < nSX && + while ( rpStart && + (rpStart->Frm().*fnRect->fnGetLeft)() < nSX && (rpStart->Frm().*fnRect->fnGetRight)()< nSX2 ) rpStart = rpStart->GetNextLayoutLeaf(); } @@ -1801,7 +1802,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, else if( nsSwTblSearchType::TBLSEARCH_COL == ((~nsSwTblSearchType::TBLSEARCH_PROTECT ) & eSearchType ) ) ::lcl_FindStartEndCol( pStart, pEnd, nsSwTblSearchType::TBLSEARCH_PROTECT & eSearchType ); - if ( !pEnd ) return; // Made code robust. + if ( !pEnd || !pStart ) return; // Made code robust. // retrieve again, as they have been moved pTable = pStart->FindTabFrm(); |