Kaydet (Commit) 3d4c086b authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#705921 Dereference before null check

Change-Id: Ied523c0ea680fa7d1fe147e7f2e7a78758bc1f14
üst a1529881
...@@ -1435,14 +1435,17 @@ SwCellFrm* SwCellFrm::GetFollowCell() const ...@@ -1435,14 +1435,17 @@ SwCellFrm* SwCellFrm::GetFollowCell() const
// find most upper row frame // find most upper row frame
const SwFrm* pRow = GetUpper(); const SwFrm* pRow = GetUpper();
while( !pRow->IsRowFrm() || !pRow->GetUpper()->IsTabFrm() ) if (!pRow)
return NULL;
while (!pRow->IsRowFrm() || !pRow->GetUpper()->IsTabFrm())
pRow = pRow->GetUpper(); pRow = pRow->GetUpper();
if ( !pRow ) if (!pRow)
return NULL; return NULL;
const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>( pRow->GetUpper() ); const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>(pRow->GetUpper());
if ( !pRow || !pTabFrm->GetFollow() || !pTabFrm->HasFollowFlowLine() ) if (!pTabFrm || !pTabFrm->GetFollow() || !pTabFrm->HasFollowFlowLine())
return NULL; return NULL;
const SwCellFrm* pThisCell = this; const SwCellFrm* pThisCell = this;
......
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