summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/opengl/gdiimpl.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 4b67ed5fb871..65650c00fcab 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -2516,8 +2516,11 @@ void OpenGLSalGraphicsImpl::doFlush()
{
FlushDeferredDrawing();
- mpContext->state()->scissor().disable();
- mpContext->state()->stencil().disable();
+ if (OpenGLContext::hasCurrent())
+ {
+ mpContext->state()->scissor().disable();
+ mpContext->state()->stencil().disable();
+ }
if( IsOffscreen() )
return;