svx/source/sidebar/paragraph/ParaSpacingWindow.cxx | 10 ++++++++-- sw/source/uibase/sidebar/PageStylesPanel.cxx | 5 +++++ 2 files changed, 13 insertions(+), 2 deletions(-)
New commits: commit a7c8b4063aae13812f23c7a7aea4ffe8799a4b76 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed May 25 10:23:48 2022 +0100 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Wed Jun 1 19:09:27 2022 +0200 91 null derefs seen in crashreporting report Change-Id: I8114f57cf5a5f74b2debac963813dcf6aac1bd0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134900 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> (cherry picked from commit 0c12c167d87faf98ba544ff8abae3aae2e759a1b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134905 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> Tested-by: Thorsten Behrens <thorsten.behr...@allotropia.de> diff --git a/sw/source/uibase/sidebar/PageStylesPanel.cxx b/sw/source/uibase/sidebar/PageStylesPanel.cxx index 114349ba194d..2a1de2ebe300 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: commit 333b83e9f0f5d1ba8774bb2a1d444e50cbe1c9dc Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed May 25 10:27:46 2022 +0100 Commit: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> CommitDate: Wed Jun 1 19:09:17 2022 +0200 50 null derefs seen in crashreporting report Change-Id: I42f1179ad1d60ac70ccda5362590853a69fd3712 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134901 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> (cherry picked from commit 29674e43755d18ece03c30719add0f403f9d90b4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134906 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> diff --git a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx index fdfbf6fd0b1f..e149b12b0439 100644 --- a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx +++ b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx @@ -94,7 +94,10 @@ void ParaULSpacingWindow::SetValue(const SvxULSpaceItem* pItem) IMPL_LINK_NOARG(ParaULSpacingWindow, ModifySpacingHdl, weld::MetricSpinButton&, void) { - SfxDispatcher* pDisp = SfxViewFrame::Current()->GetBindings().GetDispatcher(); + SfxViewFrame* pFrame = SfxViewFrame::Current(); + if (!pFrame) + return; + SfxDispatcher* pDisp = pFrame->GetBindings().GetDispatcher(); if(pDisp) { SvxULSpaceItem aMargin(SID_ATTR_PARA_ULSPACE); @@ -283,7 +286,10 @@ void ParaLRSpacingWindow::SetUnit(FieldUnit eUnit) IMPL_LINK_NOARG(ParaLRSpacingWindow, ModifySpacingHdl, weld::MetricSpinButton&, void) { - SfxDispatcher* pDisp = SfxViewFrame::Current()->GetBindings().GetDispatcher(); + SfxViewFrame* pFrame = SfxViewFrame::Current(); + if (!pFrame) + return; + SfxDispatcher* pDisp = pFrame->GetBindings().GetDispatcher(); if(pDisp) { SvxLRSpaceItem aMargin(SID_ATTR_PARA_LRSPACE);