summaryrefslogtreecommitdiff
path: root/chart2/source/model/main
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2014-07-10 11:54:10 +0200
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-07-10 22:11:28 +0200
commit942c21a003ffa2644d89c2262b55b8320f8d51aa (patch)
tree746e0b2aceada42845f29a61a1a438bf0dc93cc7 /chart2/source/model/main
parenta64675de59528391997cb25a400984666aa1b6e7 (diff)
coverity#1224984 Dereference before check
Change-Id: I93c8326d204d1b15a2a7ac5288a6c767029c6501
Diffstat (limited to 'chart2/source/model/main')
-rw-r--r--chart2/source/model/main/ChartModel.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index 3d47c77ccde2..2d2a84860145 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -1424,10 +1424,12 @@ void ChartModel::update()
mpChartView = new ChartView( m_xContext, *this);
xChartView = static_cast< ::cppu::OWeakObject* >( mpChartView );
}
-
- mpChartView->setViewDirty();
- mpChartView->update();
+ if(mpChartView)
+ {
+ mpChartView->setViewDirty();
+ mpChartView->update();
mpChartView->updateOpenGLWindow();
+ }
}
} // namespace chart