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 59fe3c2b85a2..df031620d39e 100644
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -1013,7 +1013,7 @@ Selection Window::GetSurroundingTextSelection() const
void Window::LogicInvalidate(const Rectangle* pRectangle)
{
DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(mpViewShell);
- if (pDrawViewShell && pDrawViewShell->IsInSwitchPage())
+ if (!pDrawViewShell || pDrawViewShell->IsInSwitchPage())
return;
OString sRectangle;
@@ -1026,7 +1026,7 @@ void Window::LogicInvalidate(const Rectangle* pRectangle)
aRectangle = OutputDevice::LogicToLogic(aRectangle, MapUnit::Map100thMM, MapUnit::MapTwip);
sRectangle = aRectangle.toString();
}
- SfxViewShell& rSfxViewShell = mpViewShell->GetViewShellBase();
+ SfxViewShell& rSfxViewShell = pDrawViewShell->GetViewShellBase();
SfxLokHelper::notifyInvalidation(&rSfxViewShell, sRectangle);
}