diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-09-17 09:01:59 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-05-10 16:33:49 +0200 |
commit | d6cb1b6bec09c1d1a6925e7cf83454498eb60a47 (patch) | |
tree | d1a8df7acb1b727283e304caee077697d38475a4 | |
parent | 2846307b4d886aac8b6651c53aac88f7b4b72e57 (diff) |
ofz#10395 Null-dereference
Change-Id: I7bde5987a51949d60174335327652186e0ad8998
Reviewed-on: https://gerrit.libreoffice.org/60559
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 07b3bfb125fae70e0ab796a929a4f2abe4937912)
Reviewed-on: https://gerrit.libreoffice.org/60564
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
(cherry picked from commit fde33870d6989efeb59355aad1209a7f50e7ecf6)
-rw-r--r-- | oox/source/shape/WpsContext.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx index b26ce06562b0..9f7eb664bca9 100644 --- a/oox/source/shape/WpsContext.cxx +++ b/oox/source/shape/WpsContext.cxx @@ -179,11 +179,14 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken if (rAttribs.hasAttribute(XML_prst)) { uno::Reference<beans::XPropertySet> xPropertySet(mxShape, uno::UNO_QUERY); - oox::OptValue<OUString> presetShapeName = rAttribs.getString(XML_prst); - const OUString& preset = presetShapeName.get(); - comphelper::SequenceAsHashMap aCustomShapeGeometry(xPropertySet->getPropertyValue("CustomShapeGeometry")); - aCustomShapeGeometry["PresetTextWarp"] <<= preset; - xPropertySet->setPropertyValue("CustomShapeGeometry", uno::makeAny(aCustomShapeGeometry.getAsConstPropertyValueList())); + if (xPropertySet.is()) + { + oox::OptValue<OUString> presetShapeName = rAttribs.getString(XML_prst); + const OUString& preset = presetShapeName.get(); + comphelper::SequenceAsHashMap aCustomShapeGeometry(xPropertySet->getPropertyValue("CustomShapeGeometry")); + aCustomShapeGeometry["PresetTextWarp"] <<= preset; + xPropertySet->setPropertyValue("CustomShapeGeometry", uno::makeAny(aCustomShapeGeometry.getAsConstPropertyValueList())); + } } break; case XML_txbx: |