From 253f954e3101d8d53398b7ec8d83d7b25e9a3bae Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Fri, 18 Jan 2019 20:39:49 +0200 Subject: [PATCH] [scenes/opengl] Destroy the lanczos filter when the backend is still alive Summary: Currently, when the lanczos filter attempts to release acquired resources, the backend is already gone. To fix that we have to destroy the filter together with SceneOpenGL2. At that moment the backend is still alive. BUG: 403370 FIXED-IN: 5.15.0 Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D18367 --- plugins/scenes/opengl/scene_opengl.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/scenes/opengl/scene_opengl.cpp b/plugins/scenes/opengl/scene_opengl.cpp index 49574e79b4..9c43be7c69 100644 --- a/plugins/scenes/opengl/scene_opengl.cpp +++ b/plugins/scenes/opengl/scene_opengl.cpp @@ -953,6 +953,11 @@ SceneOpenGL2::SceneOpenGL2(OpenGLBackend *backend, QObject *parent) SceneOpenGL2::~SceneOpenGL2() { + if (m_lanczosFilter) { + makeOpenGLContextCurrent(); + delete m_lanczosFilter; + m_lanczosFilter = nullptr; + } } QMatrix4x4 SceneOpenGL2::createProjectionMatrix() const