sd/source/ui/view/viewshel.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
New commits: commit 3397a9231def7173a3dd751bc2179b8ca0a7bd2d Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Sat Sep 7 18:08:41 2024 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Mon Sep 9 12:13:04 2024 +0200 sd: fix deref before null check Seen in https://crashreport.libreoffice.org/stats/signature/static%20const%20class%20com::sun::star::uno::Reference%3Ccom::sun::star::drawing::framework::XResourceId%3E%20%60sd::ViewShell::BroadcastContextForActivation'::%602'::%3Clambda_1%3E::operator()() Regression from commit 5e143492320dac8cdf8b2956799ca366f3d8e72c Author: Sarper Akdemir <sarper.akde...@allotropia.de> Date: Fri Jun 7 21:14:44 2024 +0200 tdf#33603: fix notespane (side/tool)bar interactions Change-Id: Ic6b821a660d5b5aa444224fcb6b0b4eccba5a85a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172999 Tested-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> (cherry picked from commit ec1a56b2e13f3a70a53adc6308f34ecc950600fa) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173013 Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 11f7a186f282..39423a4e082a 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -448,11 +448,12 @@ void ViewShell::BroadcastContextForActivation(const bool bIsActivated) if (xView.is()) { - auto pViewShellWrapper - = dynamic_cast<framework::ViewShellWrapper*>(xView.get()); - if (pViewShellWrapper->GetViewShell().get() == this) + if (auto pViewShellWrapper = dynamic_cast<framework::ViewShellWrapper*>(xView.get())) { - return rResId; + if (pViewShellWrapper->GetViewShell().get() == this) + { + return rResId; + } } } }