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.extern@allotropia.de>
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index d409aeec..ab8a7bb 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 )