From 6f0f4ee720ef1e8262731f59f254b83d5bdd058c Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Tue, 15 Sep 2015 14:07:27 +0100 Subject: tdf#94213 - release offscreen texture properly on re-size. We need to ensure that we use an initialized context, and that (when we re-parent) we DeInit and so reset the previous OpenGLContext. Make UseContext more paranoid as well for good measure. Change-Id: Ia45334222045e5d2f48da47560fab8511223a9a5 Reviewed-on: https://gerrit.libreoffice.org/18601 Tested-by: Jenkins Reviewed-by: Michael Meeks --- vcl/source/opengl/OpenGLContext.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vcl/source') diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index bfbd8a7b9607..1aab588565f1 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -1602,6 +1602,9 @@ void OpenGLContext::ReleaseFramebuffer( const OpenGLTexture& rTexture ) { OpenGLZone aZone; + if (!rTexture) // no texture to release. + return; + OpenGLFramebuffer* pFramebuffer = mpLastFramebuffer; while( pFramebuffer ) -- cgit