summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-11 14:07:53 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-11 14:09:53 +0100
commit86de78ce5076ed00c6ad19eae7ab6da7c7a91196 (patch)
tree1d8b0bef5971c0e80d6c9b110003ba11408e414e
parentc62e854ee40d427153b9f5d0c1d93b6ee0b13bfa (diff)
Related: fdo#81147 check if colorlist is valid
Change-Id: Ifd48526974b7fcb10872d53d42e26add3fe878d1
-rw-r--r--cui/source/tabpages/tabarea.cxx2
-rw-r--r--cui/source/tabpages/tpcolor.cxx4
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 );