summaryrefslogtreecommitdiff
path: root/vcl/source/opengl
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-09-15 14:07:27 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-09-16 02:00:16 +0000
commit6f0f4ee720ef1e8262731f59f254b83d5bdd058c (patch)
treecee592beb82cd65ba34661ea1c809bc296316443 /vcl/source/opengl
parenta60db559d409514fb93af0167c543ad2f852b499 (diff)
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 <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'vcl/source/opengl')
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx3
1 files changed, 3 insertions, 0 deletions
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 )