diff --git a/libtransmission/natpmp.c b/libtransmission/natpmp.c index 2335bc82e..8f15f89a8 100644 --- a/libtransmission/natpmp.c +++ b/libtransmission/natpmp.c @@ -85,10 +85,11 @@ tr_natpmpInit( void ) void tr_natpmpClose( tr_natpmp * nat ) { - assert( !nat->isMapped ); - - closenatpmp( &nat->natpmp ); - tr_free( nat ); + if( nat ) + { + closenatpmp( &nat->natpmp ); + tr_free( nat ); + } } static int