summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-03-21 15:40:42 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-03-21 15:52:25 +0000
commitba811903a6eb12ec599ca8e84c97d2e6cfc48cb4 (patch)
treedd6f094e5322364924d44fcaeb8daf69704be65a /writerfilter
parent94319e31f08310266280307be08f78311385ca6d (diff)
coverity#705974 Dereference before null check
Change-Id: I6286888f85214a82ad232dd26b7b23e175de39d4
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/ooxml/OOXMLFastContextHandler.cxx12
1 files changed, 3 insertions, 9 deletions
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index 667646ba5c8a..4615286d3846 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -147,8 +147,8 @@ OOXMLFastContextHandler::OOXMLFastContextHandler
mId(0),
mnDefine(0),
mnToken(OOXML_FAST_TOKENS_END),
- mpStream(NULL),
- mnTableDepth(0),
+ mpStream(pContext->mpStream),
+ mnTableDepth(pContext->mnTableDepth),
mnInstanceNumber(mnInstanceCount),
mnRefCount(0),
inPositionV(pContext->inPositionV),
@@ -157,13 +157,7 @@ OOXMLFastContextHandler::OOXMLFastContextHandler
m_bTookChoice(pContext->m_bTookChoice),
m_aSavedAlternateStates(pContext->m_aSavedAlternateStates)
{
- if (pContext != NULL)
- {
- mpStream = pContext->mpStream;
- mpParserState = pContext->mpParserState;
- mnTableDepth = pContext->mnTableDepth;
- m_xContext = pContext->m_xContext;
- }
+ mpParserState = pContext->mpParserState;
if (mpParserState.get() == NULL)
mpParserState.reset(new OOXMLParserState());