From 02ec39fda2df979fb776b71f8f2b57ac7e83f79b Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Wed, 5 Jul 2017 11:27:20 +0300 Subject: [PATCH] fix a crash, add dockviews deletion in unload --during changing layouts there were cases that Latte would crash because between deleting containment and triggering the event to delete the dockview, there was a race condition. The dockview wasnt deleted and as a consequence the libtaskmanager or kwindowsystem were forwarding events to them --- app/dockcorona.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/dockcorona.cpp b/app/dockcorona.cpp index 403c56124..9a2a3faa0 100644 --- a/app/dockcorona.cpp +++ b/app/dockcorona.cpp @@ -176,6 +176,11 @@ void DockCorona::unload() //this form doesn't crash, while qDeleteAll(containments()) does delete containments().first(); } + + qDeleteAll(m_dockViews); + qDeleteAll(m_waitingDockViews); + m_dockViews.clear(); + m_waitingDockViews.clear(); } bool DockCorona::reloadLayout(QString path)