svx/source/tbxctrls/PaletteManager.cxx | 3 +++ 1 file changed, 3 insertions(+)
New commits: commit bbf6fa94a92abc1085addaba20519ee0166bae5e Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Fri Jun 23 00:01:19 2023 +0900 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Fri Jun 23 03:53:23 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/+/153424 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx index 141938d145d7..7735e09d44e8 100644 --- a/svx/source/tbxctrls/PaletteManager.cxx +++ b/svx/source/tbxctrls/PaletteManager.cxx @@ -209,6 +209,9 @@ void PaletteManager::ReloadColorSet(SvxColorValueSet &rColorSet) rColorSet.Clear(); sal_uInt16 nItemId = 0; + if (!pColorSet) + return; + svx::ThemeColorPaletteManager aThemeColorManager(pColorSet); moThemePaletteCollection = aThemeColorManager.generate();