[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sd/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jul 9 09:18:26 UTC 2021
sd/source/ui/view/drviewsj.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit f2290187dcd59f159c560a47629b5d3897be1864
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jul 8 14:15:12 2021 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Fri Jul 9 11:17:54 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.stahl at allotropia.de>
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