diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-12-20 10:59:11 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-12-20 12:17:29 +0000 |
commit | fdefa97e0c0a97fc23bcc28e9d734f22dcac2c7d (patch) | |
tree | 04b30a843b517c0a98726e0bc9ae4991ab1c4ed8 /vcl/opengl | |
parent | b28a0eb9b6307906209816a29bc1170874f2a819 (diff) |
Related: tdf#104705 an effort to address crash
Change-Id: I43284c19d0f38fb8fbd7e908c5d255cdfd399015
Reviewed-on: https://gerrit.libreoffice.org/32222
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/win/gdiimpl.cxx | 2 | ||||
-rw-r--r-- | vcl/opengl/x11/gdiimpl.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/vcl/opengl/win/gdiimpl.cxx b/vcl/opengl/win/gdiimpl.cxx index 89e595cdc656..ce61676ccdba 100644 --- a/vcl/opengl/win/gdiimpl.cxx +++ b/vcl/opengl/win/gdiimpl.cxx @@ -77,7 +77,7 @@ void WinOpenGLContext::resetCurrent() bool WinOpenGLContext::isCurrent() { OpenGLZone aZone; - return m_aGLWin.hRC && wglGetCurrentContext() == m_aGLWin.hRC && + return g_bAnyCurrent && m_aGLWin.hRC && wglGetCurrentContext() == m_aGLWin.hRC && wglGetCurrentDC() == m_aGLWin.hDC; } diff --git a/vcl/opengl/x11/gdiimpl.cxx b/vcl/opengl/x11/gdiimpl.cxx index d46b002caf75..164fc717e498 100644 --- a/vcl/opengl/x11/gdiimpl.cxx +++ b/vcl/opengl/x11/gdiimpl.cxx @@ -232,7 +232,7 @@ void X11OpenGLContext::resetCurrent() bool X11OpenGLContext::isCurrent() { OpenGLZone aZone; - return m_aGLWin.ctx && glXGetCurrentContext() == m_aGLWin.ctx && + return g_bAnyCurrent && m_aGLWin.ctx && glXGetCurrentContext() == m_aGLWin.ctx && glXGetCurrentDrawable() == m_aGLWin.win; } |