1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-01 03:40:16 +02:00

Keep a local strong reference to prevent deleting of the current object

This commit is contained in:
Uwe L. Korn
2013-06-14 11:45:17 +02:00
committed by Michael Zanetti
parent 2066214aef
commit 1b9b706fce

View File

@@ -342,8 +342,9 @@ ConnectionManager::activate()
void
ConnectionManager::deactivate()
{
setActive( false, d_func()->nodeid, weakRef().toStrongRef() );
d_func()->mutex.unlock();
QSharedPointer<ConnectionManager> strongRef = weakRef().toStrongRef();
setActive( false, d_func()->nodeid, strongRef );
strongRef->d_func()->mutex.unlock();
}