]> granicus.if.org Git - transmission/commitdiff
(trunk libT) maybe fix that blocklist crash John_Clay reports about once a month
authorCharles Kerr <charles@transmissionbt.com>
Mon, 14 Dec 2009 18:47:45 +0000 (18:47 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Mon, 14 Dec 2009 18:47:45 +0000 (18:47 +0000)
libtransmission/blocklist.c

index 6a5033ab269577669e06bc73074e224c1893830b..2bc6c86781ce4e836643eeae3a4f9cdc38c6788a 100644 (file)
@@ -212,7 +212,8 @@ _tr_blocklistHasAddress( tr_blocklist     * b,
         return 0;
 
     blocklistEnsureLoaded( b );
-    if( !b->rules )
+
+    if( !b->rules || !b->ruleCount )
         return 0;
 
     needle = ntohl( addr->addr.addr4.s_addr );