Always destroy OpenGL context when the window is destroyed
The OpenGL context was only destroyed when the HasNativeWindow flag was set, as a consequence there was a context leak. Remove this condition and always destroy the context. Change-Id: I3e3424e9d6f179171872fdef5c929a5718af0ed5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
parent
fd1405e61b
commit
220afb358f
@ -152,12 +152,15 @@ void QEglFSWindow::destroy()
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
QOpenGLCompositor::destroy();
|
||||
if (qt_gl_global_share_context() == m_rasterCompositingContext)
|
||||
qt_gl_set_global_share_context(nullptr);
|
||||
delete m_rasterCompositingContext;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
if (qt_gl_global_share_context() == m_rasterCompositingContext)
|
||||
qt_gl_set_global_share_context(nullptr);
|
||||
delete m_rasterCompositingContext;
|
||||
#endif
|
||||
|
||||
m_flags = { };
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user