summaryrefslogtreecommitdiff
path: root/cui/source/tabpages/tphatch.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-10-18 18:56:29 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-10-18 18:57:33 +0100
commit0a7d06cfc37f94f8a7571f023e1b78b6451a5367 (patch)
tree9fd8456007af25641d19e97a4bcd9e86f547ac08 /cui/source/tabpages/tphatch.cxx
parent6b9804b8f2ca85e9eb42d344d17cfee7a7a9414c (diff)
make area tab page of paragraph properties not crash
cause the parent dialog isn't a SvxAreaTabDialog Change-Id: I1a1311ca4b414c797d4b3e72208e64bffea863ca
Diffstat (limited to 'cui/source/tabpages/tphatch.cxx')
-rw-r--r--cui/source/tabpages/tphatch.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index 9b6c5adf1ff1..7469d15567fa 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -170,8 +170,10 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet )
if( *m_pnColorListState & ChangeType::CHANGED ||
*m_pnColorListState & ChangeType::MODIFIED )
{
- if( *m_pnColorListState & ChangeType::CHANGED )
- m_pColorList = static_cast<SvxAreaTabDialog*>( GetParentDialog() )->GetNewColorList();
+ SvxAreaTabDialog* pArea = (*m_pnColorListState & ChangeType::CHANGED) ?
+ dynamic_cast<SvxAreaTabDialog*>(GetParentDialog()) : nullptr;
+ if (pArea)
+ m_pColorList = pArea->GetNewColorList();
// LbLineColor
nPos = m_pLbLineColor->GetSelectEntryPos();