Do not call swapBuffers when surfaceHandle is NULL.
Calling swapBuffers with the surfaceHandle of 0 returned by QWindow during application exit causes a crash when using GLX. The patch avoids swapBuffer calls to platformGLContext when there is no surface handle anymore. Change-Id: I09c5bbafd4e7af6648ca54a58ed0267d0a2f343d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>bb10
parent
cedf0e03d6
commit
12e471b7fd
|
|
@ -290,7 +290,9 @@ void QOpenGLContext::swapBuffers(QSurface *surface)
|
|||
return;
|
||||
}
|
||||
|
||||
d->platformGLContext->swapBuffers(surface->surfaceHandle());
|
||||
QPlatformSurface *surfaceHandle = surface->surfaceHandle();
|
||||
if (surfaceHandle)
|
||||
d->platformGLContext->swapBuffers(surfaceHandle);
|
||||
}
|
||||
|
||||
void (*QOpenGLContext::getProcAddress(const QByteArray &procName)) ()
|
||||
|
|
|
|||
Loading…
Reference in New Issue