summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 3c305d523d98..b1212fdfca4a 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -1340,11 +1340,16 @@ void OpenGLContext::prepareForYield()
{
ImplSVData* pSVData = ImplGetSVData();
- SAL_INFO("vcl.opengl", "Unbinding contexts in preparation for yield");
// release all framebuffers from the old context so we can re-attach the
// texture in the new context
OpenGLContext* pCurrentCtx = pSVData->maGDIData.mpLastContext;
- if( pCurrentCtx && pCurrentCtx->isCurrent() )
+
+ if ( !pCurrentCtx )
+ return; // Not using OpenGL
+
+ SAL_INFO("vcl.opengl", "Unbinding contexts in preparation for yield");
+
+ if( pCurrentCtx->isCurrent() )
pCurrentCtx->resetCurrent();
assert (!hasCurrent());