summaryrefslogtreecommitdiff
path: root/vcl/opengl/texture.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/opengl/texture.cxx')
-rw-r--r--vcl/opengl/texture.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/opengl/texture.cxx b/vcl/opengl/texture.cxx
index 57bd7a60a946..9b3c60592ea5 100644
--- a/vcl/opengl/texture.cxx
+++ b/vcl/opengl/texture.cxx
@@ -113,8 +113,8 @@ ImplOpenGLTexture::~ImplOpenGLTexture()
// Check we have been correctly un-bound from all framebuffers.
ImplSVData* pSVData = ImplGetSVData();
- OpenGLContext* pContext = pSVData->maGDIData.mpLastContext;
- if (pContext)
+ rtl::Reference<OpenGLContext> pContext = pSVData->maGDIData.mpLastContext;
+ if (pContext.is())
pContext->UnbindTextureFromFramebuffers( mnTexture );
glDeleteTextures( 1, &mnTexture );
@@ -375,7 +375,7 @@ void OpenGLTexture::Read( GLenum nFormat, GLenum nType, sal_uInt8* pData )
{
// Retrieve current context
ImplSVData* pSVData = ImplGetSVData();
- OpenGLContext* pContext = pSVData->maGDIData.mpLastContext;
+ rtl::Reference<OpenGLContext> pContext = pSVData->maGDIData.mpLastContext;
OpenGLFramebuffer* pFramebuffer;
pFramebuffer = pContext->AcquireFramebuffer( *this );