diff options
author | Ingrid Halama <iha@openoffice.org> | 2010-03-10 20:11:39 +0100 |
---|---|---|
committer | Ingrid Halama <iha@openoffice.org> | 2010-03-10 20:11:39 +0100 |
commit | 590a1a5225623eb922e63b02b62e711d153e9d55 (patch) | |
tree | 012a31056fc9e8cabedee2b9a6dbecfe51847b34 | |
parent | 1df0c98386af1a0a62a8b685a3b3e6d9fa462b5a (diff) |
chart43: #i109770# ChartView::getExplicitValuesForAxis accessing destroyed VCoordinateSystem
-rw-r--r-- | chart2/source/view/main/ChartView.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 51504db2a396..01dbe69db376 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -216,13 +216,15 @@ ChartView::~ChartView() void ChartView::impl_deleteCoordinateSystems() { //delete all coordinate systems - ::std::vector< VCoordinateSystem* >::const_iterator aIter = m_aVCooSysList.begin(); - const ::std::vector< VCoordinateSystem* >::const_iterator aEnd = m_aVCooSysList.end(); + ::std::vector< VCoordinateSystem* > aVectorToDeleteObjects; + ::std::swap( aVectorToDeleteObjects, m_aVCooSysList );//#i109770# + ::std::vector< VCoordinateSystem* >::const_iterator aIter = aVectorToDeleteObjects.begin(); + const ::std::vector< VCoordinateSystem* >::const_iterator aEnd = aVectorToDeleteObjects.end(); for( ; aIter != aEnd; aIter++ ) { delete *aIter; } - m_aVCooSysList.clear(); + aVectorToDeleteObjects.clear(); } |