diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-06-10 14:07:19 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-10 16:08:02 +0100 |
commit | f4c80aaf3f2b97661ecf1cfd014aaa5ad00da846 (patch) | |
tree | 3e0cd6e37cb12f89f8c0ae4831e9e612e7900f5f | |
parent | 59e9619ef91322f124b383b80fc21cd09a758017 (diff) |
coverity#1209547 Unchecked dynamic_cast
Change-Id: Ibf614156aeafcd74be444cf388e02a9273d38d5f
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 8d09c69c4b4f..b3ef441c3238 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1039,7 +1039,7 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap ) dmapper_logger->attribute("isTextAppend", xTextAppend.is()); #endif - if(xTextAppend.is() && ! getTableManager( ).isIgnore() && pParaContext != NULL) + if (xTextAppend.is() && !getTableManager( ).isIgnore() && pParaContext != NULL) { try { @@ -1174,14 +1174,17 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap ) } m_bParaChanged = false; - if(!pParaContext->IsFrameMode()) + if (!pParaContext || !pParaContext->IsFrameMode()) { // If the paragraph is in a frame, it's not a paragraph of the section itself. m_bIsFirstParaInSection = false; m_bIsLastParaInSection = false; } - // Reset the frame properties for the next paragraph - pParaContext->ResetFrameProperties(); + if (pParaContext) + { + // Reset the frame properties for the next paragraph + pParaContext->ResetFrameProperties(); + } #ifdef DEBUG_DOMAINMAPPER dmapper_logger->endElement(); |