diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-04-06 12:55:50 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-04-07 22:51:28 +0200 |
commit | 2a7bc316c9b49e5b26fad88998c5160aa9c80c61 (patch) | |
tree | 63c6e68639ac1904748ca925afcd3039bd474a8c | |
parent | 40beefc591d8417f1291834fe66a348678241820 (diff) |
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 <caolanm@redhat.com>
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit 6a1425c4c9595ed82629d846c9b69ed9942b2c0b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150080
-rw-r--r-- | sd/source/ui/view/drviews3.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index 5821168bc865..3f16136ffbe9 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 { |