diff options
-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); |