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

New commits:
commit c64e4a6ac65535e2e8ca6ba52812804618b03fac
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Thu Jun 18 09:55:44 2020 +0200
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Wed Jun 24 10:28:00 2020 +0200

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

diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx 
b/svx/source/tbxctrls/StylesPreviewWindow.cxx
index 806b168c5857..cf1fba02a2d7 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;
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to