summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2015-10-05 15:44:55 +0200
committerOliver Specht <oliver.specht@cib.de>2015-10-06 05:43:43 +0000
commit4d4bc508f03db9fa0ddae0c6aaa52e586cbe1172 (patch)
tree5545cc3a8be553a23d6abe78c1cf8188bbde48b2
parent3e5b53438d7001fde1b4664b8867be3dcfae4b95 (diff)
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@cib.de> Tested-by: Oliver Specht <oliver.specht@cib.de>
-rw-r--r--sw/source/uibase/shells/txtattr.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx
index d8a966192c38..7f6e9382a40c 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 )