Don't return a NULL client string when not connected.
This commit is contained in:
parent
0cb6a81077
commit
5035d519cc
|
@ -227,7 +227,12 @@ void tr_peerDestroy( tr_peer_t * peer )
|
|||
const char *
|
||||
tr_peerClient( tr_peer_t * peer )
|
||||
{
|
||||
if( NULL == peer->client && PEER_STATUS_HANDSHAKE < peer->status )
|
||||
if( PEER_STATUS_HANDSHAKE < peer->status )
|
||||
{
|
||||
return "not connected";
|
||||
}
|
||||
|
||||
if( NULL == peer->client )
|
||||
{
|
||||
peer->client = tr_clientForId( peer->id );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue