svx/source/tbxctrls/PaletteManager.cxx | 3 +++ 1 file changed, 3 insertions(+)
New commits: commit 6a7bfd512e7ff00d8a4caadd9edcf3299bfa35c6 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Fri Jun 23 00:01:19 2023 +0900 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Sun Jun 25 14:13:27 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> (cherry picked from commit f4867086c8498ef168f7d2e8d94b872e516a9d4d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153429 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.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();