mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
fix a possible crash when deleting a torrent.
This commit is contained in:
parent
e761e294ee
commit
d360607a02
2 changed files with 6 additions and 4 deletions
|
@ -969,6 +969,7 @@ tr_torrentRecheck( tr_torrent * tor )
|
|||
{
|
||||
tr_globalLock( tor->handle );
|
||||
|
||||
tr_ioRecheckRemove( tor );
|
||||
tr_torrentUncheck( tor );
|
||||
tr_ioRecheckAdd( tor, torrentRecheckDoneCB );
|
||||
|
||||
|
@ -1023,12 +1024,13 @@ tr_torrentClose( tr_torrent * tor )
|
|||
{
|
||||
if( tor != NULL )
|
||||
{
|
||||
tr_globalLock( tor->handle );
|
||||
tr_handle * handle = tor->handle;
|
||||
tr_globalLock( handle );
|
||||
|
||||
tr_torrentClearStatusCallback( tor );
|
||||
tr_runInEventThread( tor->handle, closeTorrent, tor );
|
||||
tr_runInEventThread( handle, closeTorrent, tor );
|
||||
|
||||
tr_globalUnlock( tor->handle );
|
||||
tr_globalUnlock( handle );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ tr_getLog( void )
|
|||
if( !initialized )
|
||||
{
|
||||
const char * str = getenv( "TR_DEBUG_FD" );
|
||||
int fd;
|
||||
int fd = 0;
|
||||
if( str && *str )
|
||||
fd = atoi( str );
|
||||
switch( fd ) {
|
||||
|
|
Loading…
Reference in a new issue