diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-08-25 12:39:37 +0200 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-08-25 13:39:00 +0200 |
commit | c46f00166027fa3eefc75f9cb13bf4afc887bf1d (patch) | |
tree | 6a2f31cf7dee19f8d095d83bafe9531607de0845 /sc/source/ui | |
parent | 8b022db4cd397fd88f8078fc7f5ff85f21635155 (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>
Diffstat (limited to 'sc/source/ui')
-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 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") { |