[PATCH] QOpenGlContext: Always unset current context in doneCurrent()
authorDavid Redondo <qt@david-redondo.de>
Wed, 15 Jan 2025 12:52:13 +0000 (13:52 +0100)
committerPatrick Franz <deltaone@debian.org>
Fri, 18 Jul 2025 13:28:20 +0000 (15:28 +0200)
commit7d04cbf3dce156352344777258c8d6e106b5163a
tree090d1ddf58f8d036d1235f67c1938ddd96e516b6
parent6279b74b8cd69598e2c3569cadfce84af7676d70
[PATCH] QOpenGlContext: Always unset current context in doneCurrent()

Otherwise when no other context is made current until thread exit, the
QGuiGLThreadContext destructor will try to call doneCurrent() on an
already deleted context.

Change-Id: If55dd69a72b8ab4012780a449f6a02729dd0ed43
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit cd1686e55f706048286cbc962bbe02032c2396cd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 10c195b86432eaa430c6991c0fcb74c411407cdf)

Gbp-Pq: Name upstream_unset_current_openglcontext.diff
src/gui/kernel/qopenglcontext.cpp
tests/auto/gui/qopengl/tst_qopengl.cpp