summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-03-19 15:15:18 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-03-19 21:07:59 +0100
commitb41bb50749cee0281ecd19bafc2bb82c671eeeba (patch)
tree981ea5579a69a9e6580c15f13f1af418e1e3a9a6 /svx
parent9e0b747a51fe30c58296c5350214e98d7ecb80a8 (diff)
cid#1473993 Uninitialized pointer read
Change-Id: Id1c4c48ef89241d2b3c8840a55a5511df7c263c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112755 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/tbxctrls/StylesPreviewWindow.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx b/svx/source/tbxctrls/StylesPreviewWindow.cxx
index 59e86b7d2bd6..08d812af6493 100644
--- a/svx/source/tbxctrls/StylesPreviewWindow.cxx
+++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx
@@ -78,8 +78,7 @@ StylePoolChangeListener::StylePoolChangeListener(StylesPreviewWindow_Base* pPrev
{
SfxObjectShell* pDocShell = SfxObjectShell::Current();
- if (pDocShell)
- m_pStyleSheetPool = pDocShell->GetStyleSheetPool();
+ m_pStyleSheetPool = pDocShell ? pDocShell->GetStyleSheetPool() : nullptr;
if (m_pStyleSheetPool)
{