sd/source/ui/view/sdwindow.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 20e2b922da0d4d49a5e1a88fddea77ade92cbdf3 Author: Sarper Akdemir <sarper.akdemir.ext...@allotropia.de> AuthorDate: Fri Apr 19 00:40:28 2024 +0200 Commit: Sarper Akdemir <sarper.akdemir.ext...@allotropia.de> CommitDate: Sat Apr 20 13:17:05 2024 +0200 related tdf#33603: sd: do not assume there's always a viewshell Change-Id: I171639150a84372e7e25b5246d4882c467edd58b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166271 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir.ext...@allotropia.de> diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index d409aeec1304..ab8a7bbd8889 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -742,7 +742,8 @@ void Window::LoseFocus() { mnTicks = 0; vcl::Window::LoseFocus (); - GetViewShell()->onLoseFocus(); + if (mpViewShell) + mpViewShell->onLoseFocus(); } /** @@ -752,7 +753,8 @@ void Window::GrabFocus() { mnTicks = 0; vcl::Window::GrabFocus (); - GetViewShell()->onGrabFocus(); + if (mpViewShell) + mpViewShell->onGrabFocus(); } void Window::DataChanged( const DataChangedEvent& rDCEvt )