[Libreoffice-commits] core.git: svx/source

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 3 05:39:55 UTC 2020


 svx/source/tbxctrls/StylesPreviewWindow.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit f6f5fa8038e1b8e320a8e74af1c5d901d13988a5
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Jun 18 09:55:44 2020 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Jul 3 07:39:22 2020 +0200

    Styles preview: avoid nullptr dereference
    
    Change-Id: I04292baa8a680f03613cef32f7cb55581b914809
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96935
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97745
    Tested-by: Jenkins

diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx b/svx/source/tbxctrls/StylesPreviewWindow.cxx
index 5f4749d2a53a..43d3b140cb35 100644
--- a/svx/source/tbxctrls/StylesPreviewWindow.cxx
+++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx
@@ -205,6 +205,9 @@ static SvxFont GetFontFromItems(const SvxFontItem* pFontItem, Size aPixelFontSiz
 void StyleItemController::DrawEntry(vcl::RenderContext& rRenderContext)
 {
     SfxObjectShell* pShell = SfxObjectShell::Current();
+    if (!pShell)
+        return;
+
     SfxStyleSheetBasePool* pPool = pShell->GetStyleSheetPool();
     SfxStyleSheetBase* pStyle = nullptr;
 


More information about the Libreoffice-commits mailing list