mirror of
https://github.com/transmission/transmission
synced 2025-02-03 13:03:50 +00:00
handle tr_torrentClose( NULL ) gracefully.
This commit is contained in:
parent
61fc032dc1
commit
5965d8d1ae
1 changed files with 7 additions and 4 deletions
|
@ -994,12 +994,15 @@ closeTorrent( void * vtor )
|
|||
void
|
||||
tr_torrentClose( tr_torrent * tor )
|
||||
{
|
||||
tr_globalLock( tor->handle );
|
||||
if( tor != NULL )
|
||||
{
|
||||
tr_globalLock( tor->handle );
|
||||
|
||||
tr_torrentClearStatusCallback( tor );
|
||||
tr_runInEventThread( tor->handle, closeTorrent, tor );
|
||||
tr_torrentClearStatusCallback( tor );
|
||||
tr_runInEventThread( tor->handle, closeTorrent, tor );
|
||||
|
||||
tr_globalUnlock( tor->handle );
|
||||
tr_globalUnlock( tor->handle );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue