diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-05-25 10:27:46 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-05-25 12:57:28 +0200 |
commit | a2b3e397d86800f9a56e83d166dcabb4f077172f (patch) | |
tree | df65519fced5105b41aa0f516b568922b761a370 /svx/source/sidebar | |
parent | 5dabac23d0b1fa3b0d6a975df3bce066d14afa8a (diff) |
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 <caolanm@redhat.com>
Diffstat (limited to 'svx/source/sidebar')
-rw-r--r-- | svx/source/sidebar/paragraph/ParaSpacingWindow.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
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); |