summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-02-17 17:50:57 +0100
committerMichael Stahl <mstahl@redhat.com>2014-07-16 15:28:23 +0200
commit50df6263ccde24874191812950dcccd8f839754b (patch)
treef64482063188d0ff07d6f52ec791f800f8e24386 /writerfilter
parent0e3826d08d7a7d54dd532319fb584008eb0e24c8 (diff)
fdo#81173 abi#3623 RTF import: missing null pointer check
(cherry picked from commit 08fb25ab7941c52d4eed0435a45a38b03aff588c) Signed-off-by: Michael Stahl <mstahl@redhat.com> Change-Id: I5861e5fec0d822f42dfeb994500a818a968e69fb
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/qa/cppunittests/rtftok/data/pass/abi3623.rtf7
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx2
2 files changed, 8 insertions, 1 deletions
diff --git a/writerfilter/qa/cppunittests/rtftok/data/pass/abi3623.rtf b/writerfilter/qa/cppunittests/rtftok/data/pass/abi3623.rtf
new file mode 100644
index 000000000000..a47161a2fb1c
--- /dev/null
+++ b/writerfilter/qa/cppunittests/rtftok/data/pass/abi3623.rtf
@@ -0,0 +1,7 @@
+{\rtf1
+{\stylesheet
+{\s2\ls1\sbasedon0 heading 2;}
+}
+\s2
+foo\par
+}
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index ff8428f3e136..b9b1adfd520c 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -3261,7 +3261,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
{
const StyleSheetEntryPtr pParent = pStyleTable->FindStyleSheetByISTD(pEntry->sBaseStyleIdentifier);
const StyleSheetPropertyMap* pParentProperties = dynamic_cast<const StyleSheetPropertyMap*>(pParent ? pParent->pProperties.get() : 0);
- if (pParentProperties->find(PROP_PARA_RIGHT_MARGIN) != pParentProperties->end())
+ if (pParentProperties && pParentProperties->find(PROP_PARA_RIGHT_MARGIN) != pParentProperties->end())
nParaRightMargin = pParentProperties->find(PROP_PARA_RIGHT_MARGIN)->second.getValue().get<sal_Int32>();
}
if (nParaRightMargin != 0)