diff options
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/charttypes/GL3DBarChart.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index 0f96e878bb04..8c547b99e90c 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -592,8 +592,13 @@ GL3DBarChart::~GL3DBarChart() joinRenderThread(); - if(mbValidContext) + if (mbValidContext) + { mpWindow->setRenderer(nullptr); + mpWindow->getContext().makeCurrent(); + mpRenderer.reset(); + mpWindow->getContext().resetCurrent(); + } } void GL3DBarChart::create3DShapes(const std::vector<std::unique_ptr<VDataSeries> >& rDataSeriesContainer, @@ -1123,6 +1128,9 @@ void GL3DBarChart::contextDestroyed() { SharedResourceAccess aResGuard(maCond1, maCond2); osl::MutexGuard aGuard(maMutex); + mpWindow->getContext().makeCurrent(); + mpRenderer.reset(); + mpWindow->getContext().resetCurrent(); mbValidContext = false; } |