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.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index bae53023dba5..51374b9f9381 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -96,7 +96,11 @@ bool OpenGLSalGraphicsImpl::AcquireContext( )
if( pContext )
pContext->AddRef();
else
+ {
pContext = mbOffscreen ? GetDefaultContext() : CreateWinContext();
+ if (pContext)
+ pContext->AddRef();
+ }
mpContext = pContext;
return (mpContext != NULL);