diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index efde8de56f72..fc702c1c3a22 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, sal_Int32 n bool bFlipH = false; bool bFlipV = false; Reference xShapeProps(xShape, UNO_QUERY); - if (xShapeProps->getPropertySetInfo()->hasPropertyByName("CustomShapeGeometry")) + if (xShapeProps.is() && xShapeProps->getPropertySetInfo() + && xShapeProps->getPropertySetInfo()->hasPropertyByName("CustomShapeGeometry")) { Sequence aGeometrySeq; xShapeProps->getPropertyValue("CustomShapeGeometry") >>= aGeometrySeq;