sd/source/filter/eppt/pptx-epptooxml.cxx | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-)
New commits: commit c750db764108da6f94160df2f4a0a6768ffc3177 Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Wed Jun 25 21:32:17 2025 +0200 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Thu Jun 26 10:59:35 2025 +0200 tdf#167214: fix crash on save on PPTX with failed embedded fonts Change-Id: I80dd19161393284983e6f0018e35d0dfd22eefc0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187005 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 963263ddb2a6..5bb2cc80ae44 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -596,18 +596,21 @@ private: { SfxStyleSheet* pStyleSheet = pTextObject->getSdrPageFromSdrObject()->GetTextStyleSheetForObject(pTextObject); - const SfxItemSet& rItemSet = pStyleSheet->GetItemSet(); - if (const SvxFontItem* pItem = rItemSet.GetItemIfSet(EE_CHAR_FONTINFO, false)) + if (pStyleSheet) { - addFontItem(pItem); - } - if (const SvxFontItem* pItem = rItemSet.GetItemIfSet(EE_CHAR_FONTINFO_CJK, false)) - { - addFontItem(pItem); - } - if (const SvxFontItem* pItem = rItemSet.GetItemIfSet(EE_CHAR_FONTINFO_CTL, false)) - { - addFontItem(pItem); + const SfxItemSet& rItemSet = pStyleSheet->GetItemSet(); + if (const SvxFontItem* pItem = rItemSet.GetItemIfSet(EE_CHAR_FONTINFO, false)) + { + addFontItem(pItem); + } + if (const SvxFontItem* pItem = rItemSet.GetItemIfSet(EE_CHAR_FONTINFO_CJK, false)) + { + addFontItem(pItem); + } + if (const SvxFontItem* pItem = rItemSet.GetItemIfSet(EE_CHAR_FONTINFO_CTL, false)) + { + addFontItem(pItem); + } } }