mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 15:59:42 +01:00
Keep a local strong reference to prevent deleting of the current object
This commit is contained in:
parent
a334c87e17
commit
13db6a6b90
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user