Revert "Always destroy OpenGL context when the window is destroyed"
This reverts commit 220afb358f.
The change caused segfault after menus or dialogs were closed.
The global raster compositing context is still being used by root
window and cannot be deleted from child window.
Pick-to: 6.7
Fixes: QTBUG-123962
Change-Id: Ie88925052f0f424617382388c587ae47570d13a7
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
bb10
parent
bd4d2786af
commit
a030795bc9
|
|
@ -152,15 +152,12 @@ 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…
Reference in New Issue