summaryrefslogtreecommitdiff
path: root/vcl/opengl/gdiimpl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/opengl/gdiimpl.cxx')
-rw-r--r--vcl/opengl/gdiimpl.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index e836e821f82f..f4fb17d8bacd 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -161,6 +161,11 @@ void OpenGLSalGraphicsImpl::PostDraw()
mpFramebuffer = NULL;
CHECK_GL_ERROR();
+
+ // release the context as there is no guarantee the underlying window
+ // will still be valid for the next draw operation
+ if( mbOffscreen )
+ ReleaseContext();
}
void OpenGLSalGraphicsImpl::freeResources()