From 3d580990643119cccb73f4f15d549863a6660aa6 Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Tue, 20 Jan 2015 21:49:30 +1100 Subject: vcl: increment ref in OpenGLSalGraphicsImpl::AcquireContext Change-Id: Id8167dfe55eb6f7a83454f5eb7a3b5a96e252980 --- vcl/opengl/gdiimpl.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'vcl/opengl') 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); -- cgit