diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-08-25 12:39:37 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2023-08-30 15:49:40 +0200 |
commit | f0f51d05f27d7a1ed31b3b9d304170f7c951f5ac (patch) | |
tree | bf1f3c621415e5fa736e7a3cb49e7352616c7e9e /sc | |
parent | a30dbb6bd9577fdfd22f5b2eb017e8ecec9b8481 (diff) |
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.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit c46f00166027fa3eefc75f9cb13bf4afc887bf1d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156004
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/attrdlg/attrdlg.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sc/source/ui/attrdlg/attrdlg.cxx b/sc/source/ui/attrdlg/attrdlg.cxx index 734ae94d606f..3f307adddeb4 100644 --- a/sc/source/ui/attrdlg/attrdlg.cxx +++ b/sc/source/ui/attrdlg/attrdlg.cxx @@ -76,8 +76,11 @@ void ScAttrDlg::PageCreated(const OString& 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") { |