summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-12-15 17:15:10 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2022-12-16 08:45:25 +0000
commit642d64f29f5965c161c56163750455d6319af972 (patch)
tree17077909aa0f627202c1b0e3701fb612b45e757b /svx
parentd3459346a6f4cf7650a03685bcc89c83716d98b1 (diff)
svx: fix null deref in ParaLineSpacingControl::ExecuteLineSpacing
See https://crashreport.libreoffice.org/stats/signature/svx::ParaLineSpacingControl::ExecuteLineSpacing(long) Change-Id: Ide29a7e78bf1114f0ebc104fa8c245e52d590eea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144190 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
index 9ff16f340b15..4283f3651136 100644
--- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
+++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
@@ -423,8 +423,12 @@ void ParaLineSpacingControl::ExecuteLineSpacing(sal_Int32 nEntry)
SetLineSpace(aSpacing, nEntry);
- SfxViewFrame::Current()->GetBindings().GetDispatcher()->ExecuteList(
- SID_ATTR_PARA_LINESPACE, SfxCallMode::RECORD, { &aSpacing });
+ SfxViewFrame* pCurrent = SfxViewFrame::Current();
+ if( pCurrent )
+ {
+ pCurrent->GetBindings().GetDispatcher()->ExecuteList(
+ SID_ATTR_PARA_LINESPACE, SfxCallMode::RECORD, { &aSpacing });
+ }
// close when the user used the buttons
mxControl->EndPopupMode();