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

coverity#705926 Dereference before null check

Change-Id: I5a475d357aed24a01cd4e1e45765f1d6e585ee45
üst fdd91a28
...@@ -479,7 +479,7 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine, ...@@ -479,7 +479,7 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine,
SwTwips nCurrentHeight = SwTwips nCurrentHeight =
lcl_CalcMinRowHeight( pTmpLastLineRow, lcl_CalcMinRowHeight( pTmpLastLineRow,
rTab.IsConsiderObjsForMinCellHeight() ); rTab.IsConsiderObjsForMinCellHeight() );
while ( pTmpLastLineRow && pTmpLastLineRow->GetNext() && nTmpCut > nCurrentHeight ) while ( pTmpLastLineRow->GetNext() && nTmpCut > nCurrentHeight )
{ {
nTmpCut -= nCurrentHeight; nTmpCut -= nCurrentHeight;
pTmpLastLineRow = (SwRowFrm*)pTmpLastLineRow->GetNext(); pTmpLastLineRow = (SwRowFrm*)pTmpLastLineRow->GetNext();
...@@ -490,8 +490,6 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine, ...@@ -490,8 +490,6 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine,
} }
// pTmpLastLineRow does not fit to the line or it is the last line // pTmpLastLineRow does not fit to the line or it is the last line
if ( pTmpLastLineRow )
{
// Check if we can move pTmpLastLineRow to the follow table, // Check if we can move pTmpLastLineRow to the follow table,
// or if we have to split the line: // or if we have to split the line:
SwFrm* pCell = pTmpLastLineRow->Lower(); SwFrm* pCell = pTmpLastLineRow->Lower();
...@@ -559,7 +557,6 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine, ...@@ -559,7 +557,6 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine,
pTmpLastLineRow = pTmp; pTmpLastLineRow = pTmp;
} }
} }
}
pCurrLastLineCell = (SwCellFrm*)pCurrLastLineCell->GetNext(); pCurrLastLineCell = (SwCellFrm*)pCurrLastLineCell->GetNext();
pCurrFollowFlowLineCell = (SwCellFrm*)pCurrFollowFlowLineCell->GetNext(); pCurrFollowFlowLineCell = (SwCellFrm*)pCurrFollowFlowLineCell->GetNext();
......
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