diff --git a/core/backends/lan/lanlinkprovider.cpp b/core/backends/lan/lanlinkprovider.cpp index c5d1024ba..67dc577c0 100644 --- a/core/backends/lan/lanlinkprovider.cpp +++ b/core/backends/lan/lanlinkprovider.cpp @@ -418,7 +418,7 @@ void LanLinkProvider::deviceLinkDestroyed(QObject* destroyedDeviceLink) if (linkIterator != mLinks.end()) { Q_ASSERT(linkIterator.value() == destroyedDeviceLink); mLinks.erase(linkIterator); - mPairingHandlers.remove(id); + mPairingHandlers.take(id)->deleteLater(); } }