[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - oox/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Sep 18 08:31:11 UTC 2018


 oox/source/shape/WpsContext.cxx |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

New commits:
commit fde33870d6989efeb59355aad1209a7f50e7ecf6
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Sep 17 09:01:59 2018 +0100
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Tue Sep 18 10:30:50 2018 +0200

    ofz#10395 Null-dereference
    
    Change-Id: I7bde5987a51949d60174335327652186e0ad8998
    Reviewed-on: https://gerrit.libreoffice.org/60559
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 07b3bfb125fae70e0ab796a929a4f2abe4937912)
    Reviewed-on: https://gerrit.libreoffice.org/60564
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>

diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx
index 67b3b1b60353..061b90a7ce8b 100644
--- a/oox/source/shape/WpsContext.cxx
+++ b/oox/source/shape/WpsContext.cxx
@@ -178,11 +178,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:


More information about the Libreoffice-commits mailing list