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-15 22:47:28 +0000
commit057a5f56a11a47da9cc7015b6d0718e57c442034 (patch)
tree5edee6267be13a7f574432c008bd1fcf74ccc7f9 /svx
parentec4409a911fd4a67eb1bc74aae33081ae8510339 (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/+/144239 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();