sd/source/ui/view/drviewsj.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit e7a086fcd10031a15d1bfda32c306834ba8a7526 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Jul 8 14:15:12 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Jul 12 10:03:09 2021 +0200 Resolves: tdf#143153 null-deref on grouping fit-to-frame obj with another Change-Id: I134d15ac980aa34ff274abd03966cd7948390542 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118628 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit f2290187dcd59f159c560a47629b5d3897be1864) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118630 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx index 47cbb175ddf4..9eebdbc57c29 100644 --- a/sd/source/ui/view/drviewsj.cxx +++ b/sd/source/ui/view/drviewsj.cxx @@ -271,7 +271,8 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) if( SfxItemState::DEFAULT == rSet.GetItemState( SID_OUTLINE_TEXT_AUTOFIT ) ) { const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - const bool bSet = pObj->GetMergedItemSet().GetItem<SdrTextFitToSizeTypeItem>(SDRATTR_TEXT_FITTOSIZE)->GetValue() != drawing::TextFitToSizeType_NONE; + const SdrTextFitToSizeTypeItem* pItem = pObj->GetMergedItemSet().GetItem<SdrTextFitToSizeTypeItem>(SDRATTR_TEXT_FITTOSIZE); + const bool bSet = pItem && pItem->GetValue() != drawing::TextFitToSizeType_NONE; rSet.Put(SfxBoolItem(SID_OUTLINE_TEXT_AUTOFIT, bSet)); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits