diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-26 12:17:58 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-27 08:53:13 +0000 |
commit | 9a61fdbf0b64dac30a2fe098388cd20471cca7bb (patch) | |
tree | ac7d6222876135a051f21455ef226483111631fc /vcl/opengl | |
parent | ee9568efee1dff59b7c5845d44d010af17ab68dd (diff) |
Related: tdf#105514 recursive fallback GetOpenGLContext
Change-Id: Icb8f3751806ef9c1c7c92cd8b7cc7c28595eca22
Reviewed-on: https://gerrit.libreoffice.org/33580
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/opengl')
-rw-r--r-- | vcl/opengl/gdiimpl.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index 904392644ac9..c483fb094f4d 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -75,6 +75,7 @@ OpenGLSalGraphicsImpl::OpenGLSalGraphicsImpl(SalGraphics& rParent, SalGeometryPr , mbUseScissor(false) , mbUseStencil(false) , mbXORMode(false) + , mbAcquiringOpenGLContext(false) , mnLineColor(SALCOLOR_NONE) , mnFillColor(SALCOLOR_NONE) #ifdef DBG_UTIL @@ -100,7 +101,12 @@ OpenGLSalGraphicsImpl::~OpenGLSalGraphicsImpl() rtl::Reference<OpenGLContext> OpenGLSalGraphicsImpl::GetOpenGLContext() { - if( !AcquireContext(true) ) + if (mbAcquiringOpenGLContext) + return nullptr; + mbAcquiringOpenGLContext = true; + bool bSuccess = AcquireContext(true); + mbAcquiringOpenGLContext = false; + if (!bSuccess) return nullptr; return mpContext; } |