diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2016-10-08 00:04:19 +0200 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2016-10-12 08:41:14 +0000 |
commit | 0d93900801224b797741e9a1abf305109fa35665 (patch) | |
tree | 5187774b6bd06e6ab6be606c1b4867ab526facfb /cui | |
parent | d19ec9a9bd371248afd7c3ca091a54b1782fddf7 (diff) |
Avoid crash on switching to pattern tab
Change-Id: I8edeb1a92c20c88160109a904cdcec355a5ef998
Reviewed-on: https://gerrit.libreoffice.org/29599
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/tppattern.cxx | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx index 7c73b3a726dc..c156d24dd0c0 100644 --- a/cui/source/tabpages/tppattern.cxx +++ b/cui/source/tabpages/tppattern.cxx @@ -73,7 +73,7 @@ public: { const Bitmap aRetval(createHistorical8x8FromArray(pBmpArray, aPixelColor, aBackgroundColor)); - return BitmapEx(aRetval); + return (pBmpArray != nullptr) ? BitmapEx(aRetval) : BitmapEx(); } void SetBmpArray( const sal_uInt16* pPixel ) { pBmpArray = pPixel; } @@ -201,7 +201,6 @@ void SvxPatternTabPage::ActivatePage( const SfxItemSet& rSet ) m_pLbBackgroundColor->SelectEntryPos( 0 ); else m_pLbBackgroundColor->SelectEntryPos( nPos ); - ChangeColor_Impl(); } // determining (possibly cutting) the name and @@ -226,8 +225,6 @@ void SvxPatternTabPage::ActivatePage( const SfxItemSet& rSet ) sal_uInt16 nId = m_pPatternLB->GetItemId( static_cast<size_t>( *m_pPos ) ); m_pPatternLB->SelectItem( nId ); } - // colors could have been deleted - ChangePatternHdl_Impl( m_pPatternLB ); *m_pPos = LISTBOX_ENTRY_NOTFOUND; } |