diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2020-06-18 09:55:44 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2020-06-24 10:28:00 +0200 |
commit | c64e4a6ac65535e2e8ca6ba52812804618b03fac (patch) | |
tree | 82349c984398c0132f0c2de504ea56b6dd23cd77 /svx | |
parent | 1165909d751f1796d952867a2a09bb7f57cdab7e (diff) |
Styles preview: avoid nullptr dereference
Change-Id: I04292baa8a680f03613cef32f7cb55581b914809
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96935
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/tbxctrls/StylesPreviewWindow.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
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; |