diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-08-19 16:49:42 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-08-19 16:49:42 +0200 |
commit | e774d798f6734f3bcc10e74bf641efcce0dedc40 (patch) | |
tree | b5f95576fda02a0a9c949287a5256087d7e080d8 | |
parent | 0bc553f3ef3c188a96ea4875f4722ad4d40da4a3 (diff) |
pShell can be null here
...e.g., when opening "Tools - Options... - LibreOffice - Colors" from the Start
Center.
Change-Id: Id83591996e03794dc7dc53ccda58df7d7624ff8d
-rw-r--r-- | svx/source/tbxctrls/PaletteManager.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx index cccf1672bc24..c2c9748cf461 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)); |