summaryrefslogtreecommitdiffstats
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 717704fcda27..1b5ffa817373 100644
--- a/chart2/source/controller/main/ChartWindow.cxx
+++ b/chart2/source/controller/main/ChartWindow.cxx
@@ -316,6 +316,9 @@ void ChartWindow::Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags
void ChartWindow::LogicInvalidate(const tools::Rectangle* pRectangle)
{
+ SfxViewShell* pCurrentShell = SfxViewShell::Current();
+ if ( nullptr == pCurrentShell )
+ return;
OString sRectangle;
if (!pRectangle)
{
@@ -360,7 +363,6 @@ void ChartWindow::LogicInvalidate(const tools::Rectangle* pRectangle)
sRectangle = aRectangle.toString();
}
- SfxViewShell* pCurrentShell = SfxViewShell::Current();
SfxLokHelper::notifyInvalidation(pCurrentShell, sRectangle);
}