From bbe886a0836056c654b0e2a64ba2547774523e2b Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Tue, 10 May 2022 13:09:28 +0200 Subject: [PATCH] ScreenEdge: fix double look-up --- src/screenedge.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/screenedge.cpp b/src/screenedge.cpp index 908a6a2db9..34cc880c68 100644 --- a/src/screenedge.cpp +++ b/src/screenedge.cpp @@ -212,8 +212,7 @@ void Edge::unreserve() } void Edge::unreserve(QObject *object) { - if (m_callBacks.contains(object)) { - m_callBacks.remove(object); + if (m_callBacks.remove(object) > 0) { disconnect(object, &QObject::destroyed, this, qOverload(&Edge::unreserve)); unreserve(); }