Don't return a NULL client string when not connected.

This commit is contained in:
Josh Elsasser 2007-04-03 18:43:01 +00:00
parent 0cb6a81077
commit 5035d519cc
1 changed files with 6 additions and 1 deletions

View File

@ -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 );
}