[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sd/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 9 08:00:41 UTC 2021


 sd/source/ui/view/drviewsj.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 3e3e0bd5a4952506aad1ee88c037f045ef594d54
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jul 8 14:15:12 2021 +0100
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Fri Jul 9 10:00: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/+/118627
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

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));
         }
 


More information about the Libreoffice-commits mailing list