summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-03-14 15:46:05 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-03-14 15:58:52 +0000
commit79fa84ccb9b45b149843ac88e4d662f2a09e94bf (patch)
treecd214cc53f70b9899e1de37565d4149aacaa31a8 /sc
parentab419e3df3f51991cc35b60144e57233bf7ac678 (diff)
coverity#705828 Dereference before null check
Change-Id: Ie76ee86f6ae48012c92a3f06ad1372f126f1ea29
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/html/htmlpars.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index e8f69e926e73..02602927f373 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -266,10 +266,8 @@ ScHTMLLayoutParser::~ScHTMLLayoutParser()
delete pS->pLocalColOffset;
delete pS;
}
- if ( pLocalColOffset )
- delete pLocalColOffset;
- if ( pColOffset )
- delete pColOffset;
+ delete pLocalColOffset;
+ delete pColOffset;
if ( pTables )
{
for( OuterMap::const_iterator it = pTables->begin(); it != pTables->end(); ++it)
@@ -1349,8 +1347,7 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo )
nColOffsetStart = pS->nColOffsetStart;
bFirstRow = pS->bFirstRow;
xLockedList = pS->xLockedList;
- if ( pLocalColOffset )
- delete pLocalColOffset;
+ delete pLocalColOffset;
pLocalColOffset = pS->pLocalColOffset;
delete pActEntry;
// pActEntry is kept around if a table is started in the same row
@@ -1370,8 +1367,7 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo )
{
ScHTMLTableStackEntry* pS = aTableStack.top();
aTableStack.pop();
- if ( pLocalColOffset )
- delete pLocalColOffset;
+ delete pLocalColOffset;
pLocalColOffset = pS->pLocalColOffset;
delete pS;
}