backends/x11: Destroy GLRenderTimeQuery while ctx is valid

BUG: 473707
This commit is contained in:
Vlad Zahorodnii 2023-08-24 10:53:51 +03:00
parent d25574e7c6
commit 43669cebda
2 changed files with 4 additions and 0 deletions

View file

@ -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();
}

View file

@ -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();
}