From cfe5bf20736e69a5003f45d3770801760499d9a1 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 28 Jun 2024 11:24:58 +0000 Subject: [PATCH] opengl: Reset OpenGlContext::currentContext() if it's destroyed GlxContext destructor doesn't reset s_currentContext. BUG: 488830 --- src/opengl/openglcontext.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/opengl/openglcontext.cpp b/src/opengl/openglcontext.cpp index 71eb109c86..12b8ce65bc 100644 --- a/src/opengl/openglcontext.cpp +++ b/src/opengl/openglcontext.cpp @@ -104,6 +104,9 @@ OpenGlContext::OpenGlContext(bool EGL) OpenGlContext::~OpenGlContext() { + if (s_currentContext == this) { + s_currentContext = nullptr; + } } bool OpenGlContext::checkTimerQuerySupport() const