sc/source/ui/attrdlg/attrdlg.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
New commits: commit 063413344120c2dff0c70b0d3fe471d08afd258a Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Fri Aug 25 12:39:37 2023 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri Sep 1 10:12:05 2023 +0200 sc: fix crash in ScAttrDlg::PageCreated See https://crashreport.libreoffice.org/stats/signature/ScAttrDlg::PageCreated(rtl::OString%20const%20&,SfxTabPage%20&) Change-Id: I3f89cc917648462f819eb35461055096a6eb3853 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156093 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com> (cherry picked from commit c46f00166027fa3eefc75f9cb13bf4afc887bf1d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156003 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sc/source/ui/attrdlg/attrdlg.cxx b/sc/source/ui/attrdlg/attrdlg.cxx index 7a80073d9da3..e09a69b5c13f 100644 --- a/sc/source/ui/attrdlg/attrdlg.cxx +++ b/sc/source/ui/attrdlg/attrdlg.cxx @@ -90,8 +90,11 @@ void ScAttrDlg::PageCreated(const OUString& rPageId, SfxTabPage& rTabPage) { const SfxPoolItem* pInfoItem = pDocSh->GetItem( SID_ATTR_CHAR_FONTLIST ); assert(pInfoItem && "FontListItem not found :-("); - aSet.Put (SvxFontListItem(static_cast<const SvxFontListItem*>(pInfoItem)->GetFontList(), SID_ATTR_CHAR_FONTLIST )); - rTabPage.PageCreated(aSet); + if (pInfoItem) + { + aSet.Put (SvxFontListItem(static_cast<const SvxFontListItem*>(pInfoItem)->GetFontList(), SID_ATTR_CHAR_FONTLIST )); + rTabPage.PageCreated(aSet); + } } else if (rPageId == "background") {