fix libT crash reported in the forums

This commit is contained in:
Charles Kerr 2007-11-23 02:14:21 +00:00
parent 8caa113d4b
commit 3b04f824e0
1 changed files with 7 additions and 2 deletions

View File

@ -882,8 +882,13 @@ tr_torrentFilesFree( tr_file_stat * files, int fileCount UNUSED )
tr_peer_stat *
tr_torrentPeers( const tr_torrent * tor, int * peerCount )
{
return tr_peerMgrPeerStats( tor->handle->peerMgr,
tor->info.hash, peerCount );
tr_peer_stat * ret = NULL;
if( tor != NULL )
ret = tr_peerMgrPeerStats( tor->handle->peerMgr,
tor->info.hash, peerCount );
return ret;
}
void