sd/source/ui/func/fusel.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
New commits: commit 1d4152621bea71d09b2a50c4927eebfa6bc48e0a Author: Caolán McNamara <[email protected]> AuthorDate: Thu Jan 22 13:05:27 2026 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Thu Jan 22 20:37:12 2026 +0100 cid#1680360 Unchecked dynamic_cast Change-Id: Ifb25c080e7894e44176873b973e217220a596ea6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197813 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index 50811e0b98f8..65b113afe2f5 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -356,10 +356,12 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) { if (rMEvt.GetClicks() == 2) { - SdrPageObj* pPageObj = static_cast<SdrPageObj*>(pObj); - sal_uInt16 nPageNum = (pPageObj->GetReferencedPage()->GetPageNum() - 1) / 2; - DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(&mrViewShell); - pDrawViewShell->SwitchPage(nPageNum); + if (DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(&mrViewShell)) + { + SdrPageObj* pPageObj = static_cast<SdrPageObj*>(pObj); + sal_uInt16 nPageNum = (pPageObj->GetReferencedPage()->GetPageNum() - 1) / 2; + pDrawViewShell->SwitchPage(nPageNum); + } } } }
