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

coverity#705828 Dereference before null check

Change-Id: Ie76ee86f6ae48012c92a3f06ad1372f126f1ea29
üst ab419e3d
...@@ -266,10 +266,8 @@ ScHTMLLayoutParser::~ScHTMLLayoutParser() ...@@ -266,10 +266,8 @@ ScHTMLLayoutParser::~ScHTMLLayoutParser()
delete pS->pLocalColOffset; delete pS->pLocalColOffset;
delete pS; delete pS;
} }
if ( pLocalColOffset ) delete pLocalColOffset;
delete pLocalColOffset; delete pColOffset;
if ( pColOffset )
delete pColOffset;
if ( pTables ) if ( pTables )
{ {
for( OuterMap::const_iterator it = pTables->begin(); it != pTables->end(); ++it) for( OuterMap::const_iterator it = pTables->begin(); it != pTables->end(); ++it)
...@@ -1349,8 +1347,7 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo ) ...@@ -1349,8 +1347,7 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo )
nColOffsetStart = pS->nColOffsetStart; nColOffsetStart = pS->nColOffsetStart;
bFirstRow = pS->bFirstRow; bFirstRow = pS->bFirstRow;
xLockedList = pS->xLockedList; xLockedList = pS->xLockedList;
if ( pLocalColOffset ) delete pLocalColOffset;
delete pLocalColOffset;
pLocalColOffset = pS->pLocalColOffset; pLocalColOffset = pS->pLocalColOffset;
delete pActEntry; delete pActEntry;
// pActEntry is kept around if a table is started in the same row // pActEntry is kept around if a table is started in the same row
...@@ -1370,8 +1367,7 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo ) ...@@ -1370,8 +1367,7 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo )
{ {
ScHTMLTableStackEntry* pS = aTableStack.top(); ScHTMLTableStackEntry* pS = aTableStack.top();
aTableStack.pop(); aTableStack.pop();
if ( pLocalColOffset ) delete pLocalColOffset;
delete pLocalColOffset;
pLocalColOffset = pS->pLocalColOffset; pLocalColOffset = pS->pLocalColOffset;
delete pS; delete pS;
} }
......
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