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:
Jacek Poplawski 2023-12-04 08:33:51 +01:00
parent fd1405e61b
commit 220afb358f

View File

@ -152,11 +152,14 @@ void QEglFSWindow::destroy()
#ifndef QT_NO_OPENGL
QOpenGLCompositor::destroy();
#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 = { };
}