mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-08 23:26:40 +02:00
Keep a local strong reference to prevent deleting of the current object
This commit is contained in:
committed by
Michael Zanetti
parent
2066214aef
commit
1b9b706fce
@@ -342,8 +342,9 @@ ConnectionManager::activate()
|
|||||||
void
|
void
|
||||||
ConnectionManager::deactivate()
|
ConnectionManager::deactivate()
|
||||||
{
|
{
|
||||||
setActive( false, d_func()->nodeid, weakRef().toStrongRef() );
|
QSharedPointer<ConnectionManager> strongRef = weakRef().toStrongRef();
|
||||||
d_func()->mutex.unlock();
|
setActive( false, d_func()->nodeid, strongRef );
|
||||||
|
strongRef->d_func()->mutex.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user