svx/source/tbxctrls/PaletteManager.cxx | 3 +++ 1 file changed, 3 insertions(+)
New commits: commit b62c2b10066638b7f545865a608b5c197b1c1224 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Fri Jun 23 00:01:19 2023 +0900 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Thu Jun 22 17:28:45 2023 +0200 fix crash in PaletteManager triggered by the color picker The code expects the SfxObjectShell::GetThemeColors() always returns a current set of theme colors, but then for some modules we return nullptr. Change-Id: I4096b75942d818965cedf43f35444faeb870cb74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153463 Reviewed-by: Michael Meeks <michael.me...@collabora.com> Tested-by: Michael Meeks <michael.me...@collabora.com> diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx index 082b07f94c92..f43bd984bcf9 100644 --- a/svx/source/tbxctrls/PaletteManager.cxx +++ b/svx/source/tbxctrls/PaletteManager.cxx @@ -210,6 +210,9 @@ void PaletteManager::ReloadColorSet(SvxColorValueSet &rColorSet) rColorSet.Clear(); sal_uInt16 nItemId = 0; + if (!pColorSet) + return; + svx::ThemeColorPaletteManager aThemeColorManager(pColorSet); moThemePaletteCollection = aThemeColorManager.generate();