sw/source/uibase/sidebar/PageStylesPanel.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit 5dabac23d0b1fa3b0d6a975df3bce066d14afa8a Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed May 25 10:23:48 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed May 25 12:56:41 2022 +0200 91 null derefs seen in crashreporting report Change-Id: I8114f57cf5a5f74b2debac963813dcf6aac1bd0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134930 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/uibase/sidebar/PageStylesPanel.cxx b/sw/source/uibase/sidebar/PageStylesPanel.cxx index c0e1e89b43e0..ca481345d581 100644 --- a/sw/source/uibase/sidebar/PageStylesPanel.cxx +++ b/sw/source/uibase/sidebar/PageStylesPanel.cxx @@ -160,6 +160,11 @@ void PageStylesPanel::Update() { const eFillStyle eXFS = static_cast<eFillStyle>(mxBgFillType->get_active()); SfxObjectShell* pSh = SfxObjectShell::Current(); + if (!pSh) + { + SAL_WARN("sw.ui", "PageStylesPanel::Update(): no SfxObjectShell found"); + return; + } switch(eXFS) { case NONE: