1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 09:37:56 +00:00

(trunk libT) prevent crash on shutdown when bindinfo ptr can be NULL

This commit is contained in:
Jordan Lee 2011-01-05 08:07:04 +00:00
parent c48528faf1
commit fde6b36e57

View file

@ -241,7 +241,7 @@ tr_sessionGetPublicAddress( const tr_session * session, int tr_af_type, tr_bool
break;
}
if( is_default_value != NULL )
if( is_default_value && bindinfo )
*is_default_value = !tr_strcmp0( default_value, tr_ntop_non_ts( &bindinfo->addr ) );
return bindinfo ? &bindinfo->addr : NULL;