[Libreoffice-commits] core.git: sw/source

Oliver Specht oliver.specht at cib.de
Mon Oct 5 22:44:09 PDT 2015


 sw/source/uibase/shells/txtattr.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 4d4bc508f03db9fa0ddae0c6aaa52e586cbe1172
Author: Oliver Specht <oliver.specht at cib.de>
Date:   Mon Oct 5 15:44:55 2015 +0200

    tdf#93860: crash in table selection fixed
    
    state method of FN_GROW/SHRINK_FONT_SIZE must not access invalid pointers
    
    Change-Id: I0db539d735663561db84cf186a6ef31c8ad3de53
    Reviewed-on: https://gerrit.libreoffice.org/19156
    Reviewed-by: Oliver Specht <oliver.specht at cib.de>
    Tested-by: Oliver Specht <oliver.specht at cib.de>

diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx
index d8a9661..7f6e938 100644
--- a/sw/source/uibase/shells/txtattr.cxx
+++ b/sw/source/uibase/shells/txtattr.cxx
@@ -637,6 +637,12 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
                         vFontHeight = rSh.GetItemWithPaM( RES_CHRATR_FONTSIZE );
                     for ( std::pair< const SfxPoolItem*, std::unique_ptr<SwPaM>>& pIt : vFontHeight )
                     {
+                        if (!pIt.first)
+                        {
+                            rSet.DisableItem(FN_GROW_FONT_SIZE);
+                            rSet.DisableItem(FN_SHRINK_FONT_SIZE);
+                            break;
+                        }
                         pSize = static_cast<const SvxFontHeightItem*>( pIt.first );
                         sal_uInt32 nSize = pSize->GetHeight();
                         if( nSize == nFontMaxSz )


More information about the Libreoffice-commits mailing list