From 0d93900801224b797741e9a1abf305109fa35665 Mon Sep 17 00:00:00 2001 From: Katarina Behrens Date: Sat, 8 Oct 2016 00:04:19 +0200 Subject: Avoid crash on switching to pattern tab Change-Id: I8edeb1a92c20c88160109a904cdcec355a5ef998 Reviewed-on: https://gerrit.libreoffice.org/29599 Tested-by: Jenkins Reviewed-by: Katarina Behrens --- cui/source/tabpages/tppattern.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'cui') 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( *m_pPos ) ); m_pPatternLB->SelectItem( nId ); } - // colors could have been deleted - ChangePatternHdl_Impl( m_pPatternLB ); *m_pPos = LISTBOX_ENTRY_NOTFOUND; } -- cgit