svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
New commits: commit 140031993ff2258a6bd498d64bd804eb8f212aa1 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Dec 15 17:15:10 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Dec 16 09:08:43 2022 +0000 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/+/144191 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> 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();