Do not call swapBuffers when surfaceHandle is NULL.
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>
Tue, 18 Oct 2011 09:06:24 +0000 (12:06 +0300)
committerQt by Nokia <qt-info@nokia.com>
Tue, 18 Oct 2011 12:09:16 +0000 (14:09 +0200)
commit12e471b7fd254fa276f19f7c7c980b4cee9ba005
treeaaae46afa0164dc07344977bee9997755b58e81f
parentcedf0e03d652ea9d712e65f7cce413f3be0009f6
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>
src/gui/kernel/qopenglcontext.cpp