svx/source/tbxctrls/StylesPreviewWindow.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit b41bb50749cee0281ecd19bafc2bb82c671eeeba
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Mar 19 15:15:18 2021 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Mar 19 21:07:59 2021 +0100

    cid#1473993 Uninitialized pointer read
    
    Change-Id: Id1c4c48ef89241d2b3c8840a55a5511df7c263c4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112755
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

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)
     {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to