From 86de78ce5076ed00c6ad19eae7ab6da7c7a91196 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 11 Jul 2014 14:07:53 +0100 Subject: Related: fdo#81147 check if colorlist is valid Change-Id: Ifd48526974b7fcb10872d53d42e26add3fe878d1 --- cui/source/tabpages/tabarea.cxx | 2 +- cui/source/tabpages/tpcolor.cxx | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx index 3fcdbce92327..3d3b3f82a17b 100644 --- a/cui/source/tabpages/tabarea.cxx +++ b/cui/source/tabpages/tabarea.cxx @@ -191,7 +191,7 @@ void SvxAreaTabDialog::SavePalettes() } } - if( mnColorListState & CT_MODIFIED ) + if (mnColorListState & CT_MODIFIED && mpColorList.is()) { mpColorList->SetPath( aPath ); mpColorList->Save(); diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 52ead2371577..5c2ecd7bc6b4 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -584,15 +584,13 @@ bool SvxColorTabPage::FillItemSet( SfxItemSet* rSet ) void SvxColorTabPage::UpdateModified() { - bool bEnable = pColorList->Count(); + bool bEnable = pColorList.is() && pColorList->Count(); m_pBtnModify->Enable( bEnable ); m_pBtnWorkOn->Enable( bEnable ); m_pBtnDelete->Enable( bEnable ); EnableSave( bEnable ); } - - void SvxColorTabPage::Reset( const SfxItemSet* rSet ) { sal_uInt16 nState = rSet->GetItemState( XATTR_FILLCOLOR ); -- cgit