svx/source/sdr/contact/viewobjectcontact.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 669ee4ab680736ad87f0e41071eff906e6354480 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Thu May 25 19:43:56 2023 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue May 30 21:41:33 2023 +0200 tdf#155436 svx: PDF export: fix crash on SdrMediaObj without URL Both sw and sd don't call CreateScreen() if there is no URL. (regression from commit e84b310b59825fd572d79def98c3d21566aac603) Change-Id: I087511bb6ed41b0e39321f6ca8684f60261f01cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152282 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit 8061cd765c7854667550d6aafda5832715648876) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152228 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Tested-by: Xisco Fauli <xiscofa...@libreoffice.org> (cherry picked from commit 870aec31003df482b1b1a6bf0acdd9cb7e9e7b10) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152320 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org> Reviewed-by: Hossein <hoss...@libreoffice.org> diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx b/svx/source/sdr/contact/viewobjectcontact.cxx index 2e2ecfe8f711..aff704134ae1 100644 --- a/svx/source/sdr/contact/viewobjectcontact.cxx +++ b/svx/source/sdr/contact/viewobjectcontact.cxx @@ -31,6 +31,7 @@ #include <drawinglayer/primitive2d/transformprimitive2d.hxx> #include <drawinglayer/primitive2d/structuretagprimitive2d.hxx> #include <svx/svdobj.hxx> +#include <svx/svdomedia.hxx> #include <svx/svdmodel.hxx> #include <svx/svdpage.hxx> #include <svx/svdotext.hxx> @@ -434,7 +435,8 @@ drawinglayer::primitive2d::Primitive2DContainer const & ViewObjectContact::getPr } ::std::vector<sal_Int32> annotIds; - if (eElement == vcl::PDFWriter::Annot) + if (eElement == vcl::PDFWriter::Annot + && !static_cast<SdrMediaObj*>(pSdrObj)->getURL().isEmpty()) { auto const pPDFExtOutDevData(GetObjectContact().GetPDFExtOutDevData()); assert(pPDFExtOutDevData);