From 43669cebda77a5e4540923d944e19686d268b45f Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 24 Aug 2023 10:53:51 +0300 Subject: [PATCH] backends/x11: Destroy GLRenderTimeQuery while ctx is valid BUG: 473707 --- src/backends/x11/standalone/x11_standalone_egl_backend.cpp | 2 ++ src/backends/x11/standalone/x11_standalone_glx_backend.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/backends/x11/standalone/x11_standalone_egl_backend.cpp b/src/backends/x11/standalone/x11_standalone_egl_backend.cpp index 86cf69baee..5b30466dd0 100644 --- a/src/backends/x11/standalone/x11_standalone_egl_backend.cpp +++ b/src/backends/x11/standalone/x11_standalone_egl_backend.cpp @@ -82,6 +82,8 @@ EglBackend::~EglBackend() // if the render backend is about to be destroyed. RenderLoopPrivate::get(m_backend->renderLoop())->invalidate(); + m_query.reset(); + if (isFailed() && m_overlayWindow) { m_overlayWindow->destroy(); } diff --git a/src/backends/x11/standalone/x11_standalone_glx_backend.cpp b/src/backends/x11/standalone/x11_standalone_glx_backend.cpp index b8081a8b48..efae3b38a8 100644 --- a/src/backends/x11/standalone/x11_standalone_glx_backend.cpp +++ b/src/backends/x11/standalone/x11_standalone_glx_backend.cpp @@ -153,6 +153,8 @@ GlxBackend::~GlxBackend() // if the render backend is about to be destroyed. RenderLoopPrivate::get(m_backend->renderLoop())->invalidate(); + m_query.reset(); + if (isFailed()) { m_overlayWindow->destroy(); }