diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2020-07-07 14:24:57 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2020-07-08 09:53:39 +0200 |
commit | 0695b5f5b328a1bc9cfdc8ba020dbdd674185e04 (patch) | |
tree | ca253365b02fb069beb4f262ff169ab0609790fb /svx | |
parent | 4bc6cc1416db4eb206cfec5016513778e55b305c (diff) |
Avoid nullptr dereference
Change-Id: I5f2bd8206a1339e09f277cdc7f0c6a01a6d85df7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98259
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
(cherry picked from commit c9ceaeaee923a742d842fbc6174222eaf9667ca6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98270
Tested-by: Jenkins
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/tbxctrls/StylesPreviewWindow.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx b/svx/source/tbxctrls/StylesPreviewWindow.cxx index 09e8a849fb68..7861467422d1 100644 --- a/svx/source/tbxctrls/StylesPreviewWindow.cxx +++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx @@ -66,7 +66,8 @@ StyleStatusListener::StyleStatusListener( void StyleStatusListener::StateChanged(SfxItemState /*eState*/, const SfxPoolItem* pState) { const SfxTemplateItem* pStateItem = dynamic_cast<const SfxTemplateItem*>(pState); - m_pPreviewControl->Select(pStateItem->GetStyleName()); + if (pStateItem) + m_pPreviewControl->Select(pStateItem->GetStyleName()); } StyleItemController::StyleItemController( |