[Libreoffice-commits] core.git: svx/source
Stephan Bergmann
sbergman at redhat.com
Fri Aug 19 14:51:05 UTC 2016
svx/source/tbxctrls/PaletteManager.cxx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit e774d798f6734f3bcc10e74bf641efcce0dedc40
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Aug 19 16:49:42 2016 +0200
pShell can be null here
...e.g., when opening "Tools - Options... - LibreOffice - Colors" from the Start
Center.
Change-Id: Id83591996e03794dc7dc53ccda58df7d7624ff8d
diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx
index cccf167..c2c9748 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -194,8 +194,11 @@ void PaletteManager::SetPalette( sal_Int32 nPos )
if(pColorList->Load())
{
SfxObjectShell* pShell = SfxObjectShell::Current();
- SvxColorListItem aColorItem(pColorList, SID_COLOR_TABLE);
- pShell->PutItem( aColorItem );
+ if (pShell != nullptr)
+ {
+ SvxColorListItem aColorItem(pColorList, SID_COLOR_TABLE);
+ pShell->PutItem( aColorItem );
+ }
}
}
std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create(m_context));
More information about the Libreoffice-commits
mailing list