sd/source/ui/view/drviews3.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit f7a5856a4a627548594b3d003903945a41d47e51 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Apr 6 12:55:50 2023 +0200 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Apr 7 22:51:17 2023 +0200 sd: fix crash in DrawViewShell::ExecCtrl See https://crashreport.libreoffice.org/stats/signature/sd::DrawViewShell::ExecCtrl(SfxRequest%20&) I believe this crash is triggered with some basic code while slideshow is running. Anyway, if I delete the previous SlideShow::IsRunning(GetViewShellBase()) check, launch Impress and add a new slide, LibreOfice also crashes. Change-Id: Iba40f37485a4a6815729a1a26c380b6c3fdedfd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150097 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> (cherry picked from commit 6a1425c4c9595ed82629d846c9b69ed9942b2c0b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150079 diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index e0c0db7b7e48..b75a5d61733f 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -140,8 +140,8 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) // switch page in running slide show if(SlideShow::IsRunning(GetViewShellBase()) && rReq.GetArgs()) { - const SfxUInt32Item* pWhatPage = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATPAGE); - SlideShow::GetSlideShow(GetViewShellBase())->jumpToPageNumber(static_cast<sal_Int32>((pWhatPage->GetValue()-1)>>1)); + if (const SfxUInt32Item* pWhatPage = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATPAGE)) + SlideShow::GetSlideShow(GetViewShellBase())->jumpToPageNumber(static_cast<sal_Int32>((pWhatPage->GetValue()-1)>>1)); } else {