diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-09-10 20:04:18 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-09-11 17:23:09 +0200 |
commit | 1b6288bbe7db9a82c3fceb3e9b2805c566c98649 (patch) | |
tree | 278edb001997574ede8a9ffc01d898788e3470cf | |
parent | 68edc89a5159aace580b81e92b3c86e5116343c6 (diff) |
cid#1619294 Dereference null return value
Change-Id: I07246237df3ebd6040353938984622e530b9ce2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173146
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit e53df700aa6d50003cd86d3190a3e4348f66e240)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173165
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
-rw-r--r-- | svx/source/gallery2/galbrws1.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index f17bf7871917..a73060a50f01 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -287,7 +287,12 @@ void GalleryBrowser1::ImplGalleryThemeProperties( std::u16string_view rThemeName { DBG_ASSERT(!mpThemePropsDlgItemSet, "mpThemePropsDlgItemSet already set!"); mpThemePropsDlgItemSet.reset(new SfxItemSet( SfxGetpApp()->GetPool() )); - GalleryTheme* pTheme = mpGallery->AcquireTheme( rThemeName, maLocalListener ); + GalleryTheme* pTheme = mpGallery->AcquireTheme( rThemeName, maLocalListener ); + if (!pTheme) + { + SAL_WARN("svx", "failed to acquire theme: " << OUString(rThemeName)); + return; + } ImplFillExchangeData( pTheme, *mpExchangeData ); |