summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sd/source/ui/view/sdwindow.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index f5c747ec8fec..0eee0a3445e6 100644
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -1018,7 +1018,7 @@ Selection Window::GetSurroundingTextSelection() const
void Window::LogicInvalidate(const ::tools::Rectangle* pRectangle)
{
DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(mpViewShell);
- if (pDrawViewShell && pDrawViewShell->IsInSwitchPage())
+ if (!pDrawViewShell || pDrawViewShell->IsInSwitchPage())
return;
OString sRectangle;
@@ -1031,7 +1031,7 @@ void Window::LogicInvalidate(const ::tools::Rectangle* pRectangle)
aRectangle = OutputDevice::LogicToLogic(aRectangle, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip));
sRectangle = aRectangle.toString();
}
- SfxViewShell& rSfxViewShell = mpViewShell->GetViewShellBase();
+ SfxViewShell& rSfxViewShell = pDrawViewShell->GetViewShellBase();
SfxLokHelper::notifyInvalidation(&rSfxViewShell, sRectangle);
}