summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/sdwindow.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/view/sdwindow.cxx')
-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 cfc5b3f68570..a82f8fff1a28 100644
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -1012,7 +1012,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;
@@ -1025,7 +1025,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);
}