summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-07-05 09:55:18 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2023-07-05 16:50:25 +0200
commitb8d2abeff262b25ff1b7d4204cdd844ac595d847 (patch)
tree8637acd1d437d70b2d8b79d1065b9487225e9cbf /oox
parent8a639c80ddb9ea2a40b63e6f0d97dfcb056183c0 (diff)
oox: fix crash in lcl_GetGluePointId
See https://crashreport.libreoffice.org/stats/signature/static%20long%20oox::drawingml::lcl_GetGluePointId(const%20class%20com::sun::star::uno::Reference%3Ccom::sun::star::drawing::XShape%3E%20&%20const,%20long) Regression from b7c542b5085374f1d031183cb86ceeefcf24964d "tdf#154363 sd: fix line connectors regression of mirrored shapes" Change-Id: I926d32f5b68582df588c28a800b0ec10e7e3e19f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154021 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 66fbe1fcc36b7ac67c4b06d7917705cd1171c2ea) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154030
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/shapes.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 0fc6eb337513..cfc980f95b96 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1675,7 +1675,8 @@ static sal_Int32 lcl_GetGluePointId(const Reference<XShape>& xShape, sal_Int32 n
bool bFlipH = false;
bool bFlipV = false;
Reference<XPropertySet> xShapeProps(xShape, UNO_QUERY);
- if (xShapeProps->getPropertySetInfo()->hasPropertyByName("CustomShapeGeometry"))
+ if (xShapeProps.is() && xShapeProps->getPropertySetInfo()
+ && xShapeProps->getPropertySetInfo()->hasPropertyByName("CustomShapeGeometry"))
{
Sequence<PropertyValue> aGeometrySeq;
xShapeProps->getPropertyValue("CustomShapeGeometry") >>= aGeometrySeq;