summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-06-23 00:01:19 +0900
committerTomaž Vajngerl <quikee@gmail.com>2023-06-23 03:53:23 +0200
commitbbf6fa94a92abc1085addaba20519ee0166bae5e (patch)
tree08e2032700b6fdb39a3a25a1947924a411fb9460
parent0533b51dbe13838d2bffdf59fdf6fcfe36c4a451 (diff)
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 <quikee@gmail.com>
-rw-r--r--svx/source/tbxctrls/PaletteManager.cxx3
1 files changed, 3 insertions, 0 deletions
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();