From c1ce7d9f2c4036ae71f8cfa71e4bee4067f4d8d2 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 2 Mar 2022 08:19:39 +0100 Subject: svx: the SdrObject of SvxGraphicObject can be nullptr Crashreport: Graphic::GetType() const vcl/inc/impgraph.hxx:122 SvxGraphicObject::getPropertyValueImpl(rtl::OUString const&, SfxItemPropertySimpleEntry const*, com::sun::star::uno::Any&) svx/source/unodraw/unoshap2.cxx:1466 (discriminator 1) SvxShape::_getPropertyValue(rtl::OUString const&) svx/source/unodraw/unoshape.cxx:1747 non-virtual thunk to SvxShape::getPropertyValue(rtl::OUString const&) svx/source/unodraw/unoshape.cxx:1732 During SVG export of a selected shape. Change-Id: I29b56d49b0c5418dfe8fec8491ac8667e5ade2ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130740 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130819 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- svx/source/unodraw/unoshap2.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'svx') diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 057b55de9fde..46343f1303ce 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -1464,7 +1464,8 @@ bool SvxGraphicObject::getPropertyValueImpl( const OUString& rName, const SfxIte Reference xGraphic; auto pSdrGraphicObject = static_cast(GetSdrObject()); - if (pSdrGraphicObject->GetGraphicObject().GetType() != GraphicType::NONE) + if (pSdrGraphicObject + && pSdrGraphicObject->GetGraphicObject().GetType() != GraphicType::NONE) xGraphic = pSdrGraphicObject->GetGraphic().GetXGraphic(); rValue <<= xGraphic; break; -- cgit