chart2/source/view/charttypes/GL3DBarChart.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
New commits: commit 7df948695e5be0077fd9d7d8bc8e25072c345890 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Apr 25 15:07:54 2017 +0100 Resolves: tdf#107372 set opengl context when using opengl functions even if they are teardown ones Change-Id: Ie222d3ffb2b555c0013d7346552d3fc76ec87d9b Reviewed-on: https://gerrit.libreoffice.org/36948 Tested-by: Jenkins <c...@libreoffice.org> Tested-by: Julien Nabet <serval2...@yahoo.fr> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> 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; }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits