svx/source/sidebar/paragraph/ParaSpacingWindow.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
New commits: commit a2b3e397d86800f9a56e83d166dcabb4f077172f Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed May 25 10:27:46 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed May 25 12:57:28 2022 +0200 50 null derefs seen in crashreporting report Change-Id: I42f1179ad1d60ac70ccda5362590853a69fd3712 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134931 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx index 8c48de0e0761..917933018f9f 100644 --- a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx +++ b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx @@ -93,7 +93,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); @@ -281,7 +284,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);