[windowthumbnail] Verify that the relevant GLContext exists, not any

glXGetCurrentContext checks if any GLContext exists and is current.

resolveGLXFunctions uses window->openglContext()

One can hit a situation that you are using software rendering for the
window, yet someone else has created a GL Context. This then crashes.
This commit is contained in:
David Edmundson 2020-09-19 23:16:32 +01:00
parent 36247d97c4
commit 4a9e57b7df

View File

@ -376,7 +376,7 @@ void WindowThumbnail::iconToTexture(WindowTextureNode *textureNode)
#if HAVE_GLX
bool WindowThumbnail::windowToTextureGLX(WindowTextureNode *textureNode)
{
if (glXGetCurrentContext()) {
if (window()->openglContext()) {
if (!m_openGLFunctionsResolved) {
resolveGLXFunctions();
}