qpa: Fix a crash in EGLPlatformContext::swapBuffers()
After internalWindow->present() is called, we cannot guarantee that the current opengl context hasn't changed. If kwin changes the current opengl context, bindContextFBO() can crash because there may not be current QOpenGLContext. BUG: 455435
This commit is contained in:
parent
34ce3dde87
commit
24bc3fed6c
1 changed files with 2 additions and 1 deletions
|
@ -120,8 +120,9 @@ void EGLPlatformContext::swapBuffers(QPlatformSurface *surface)
|
|||
}
|
||||
context()->makeCurrent(surface->surface());
|
||||
glFlush();
|
||||
internalWindow->present(window->swapFBO());
|
||||
auto fbo = window->swapFBO();
|
||||
window->bindContentFBO();
|
||||
internalWindow->present(fbo);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue