Kaydet (Commit) 8721ae4f authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#705493 Dereference null return value

Change-Id: I20133ad19197fdfe40bb449680ac274ca0fa056e
üst 6abeecc6
...@@ -725,12 +725,15 @@ SwPageDesc *SwPageFrm::FindPageDesc() ...@@ -725,12 +725,15 @@ SwPageDesc *SwPageFrm::FindPageDesc()
if( pSh && pSh->GetViewOptions()->getBrowseMode() ) if( pSh && pSh->GetViewOptions()->getBrowseMode() )
{ {
SwCntntFrm *pFrm = GetUpper()->ContainsCntnt(); SwCntntFrm *pFrm = GetUpper()->ContainsCntnt();
while ( !pFrm->IsInDocBody() ) while (pFrm && !pFrm->IsInDocBody())
pFrm = pFrm->GetNextCntntFrm(); pFrm = pFrm->GetNextCntntFrm();
SwFrm *pFlow = pFrm; if (pFrm)
if ( pFlow->IsInTab() ) {
pFlow = pFlow->FindTabFrm(); SwFrm *pFlow = pFrm;
pRet = (SwPageDesc*)pFlow->GetAttrSet()->GetPageDesc().GetPageDesc(); if ( pFlow->IsInTab() )
pFlow = pFlow->FindTabFrm();
pRet = (SwPageDesc*)pFlow->GetAttrSet()->GetPageDesc().GetPageDesc();
}
if ( !pRet ) if ( !pRet )
pRet = &GetFmt()->GetDoc()->GetPageDesc( 0 ); pRet = &GetFmt()->GetDoc()->GetPageDesc( 0 );
return pRet; return pRet;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment