summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/source/controller/main/ChartWindow.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx
index d50a741cd001..58d6c291cb74 100644
--- a/chart2/source/controller/main/ChartWindow.cxx
+++ b/chart2/source/controller/main/ChartWindow.cxx
@@ -322,6 +322,9 @@ void ChartWindow::Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags
void ChartWindow::LogicInvalidate(const Rectangle* pRectangle)
{
+ SfxViewShell* pCurrentShell = SfxViewShell::Current();
+ if ( nullptr == pCurrentShell )
+ return;
OString sRectangle;
if (!pRectangle)
{
@@ -366,7 +369,6 @@ void ChartWindow::LogicInvalidate(const Rectangle* pRectangle)
sRectangle = aRectangle.toString();
}
- SfxViewShell* pCurrentShell = SfxViewShell::Current();
SfxLokHelper::notifyInvalidation(pCurrentShell, sRectangle);
}