sd/source/ui/view/viewshel.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
New commits: commit ec1a56b2e13f3a70a53adc6308f34ecc950600fa Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Sat Sep 7 18:08:41 2024 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Sat Sep 7 21:51:28 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> diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 23f6d811c0cd..442ce20a553b 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; + } } } }