From 456c65fc19eb49afa14b3a75755199a8b35a11df Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Tue, 5 Mar 2019 14:25:20 +0200 Subject: [PATCH] Verify that there is no scene windows when Scene is about to be destroyed Summary: When ~Scene is called, it's not guaranteed that backend is still valid or that there is current opengl context. So, generally speaking, deleting scene windows in ~Scene is a bad idea. It's okay not to delete scene windows in ~Scene because current implementation of Compositor::finish ensures that they don't last longer than the scene. Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D19540 --- scene.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene.cpp b/scene.cpp index 1a590ee33c..0b45ae9a3c 100644 --- a/scene.cpp +++ b/scene.cpp @@ -100,7 +100,7 @@ Scene::Scene(QObject *parent) Scene::~Scene() { - qDeleteAll(m_windows); + Q_ASSERT(m_windows.isEmpty()); } // returns mask and possibly modified region