]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add missing line; add similar check
authorNick Mathewson <nickm@torproject.org>
Thu, 14 Oct 2004 02:29:03 +0000 (02:29 +0000)
committerNick Mathewson <nickm@torproject.org>
Thu, 14 Oct 2004 02:29:03 +0000 (02:29 +0000)
svn:r2481

src/or/routerlist.c

index e942e9623b76fb4e6db857135971a60e103a1148..aa6a74572756e04a71b62baf63e90dbc711e731f 100644 (file)
@@ -77,7 +77,7 @@ routerinfo_t *router_pick_directory_server(int requireothers) {
   routerinfo_t *choice;
 
   if (!routerlist)
-    
+    return NULL;
 
   choice = router_pick_directory_server_impl(requireothers, options.FascistFirewall);
   if(choice)
@@ -176,6 +176,9 @@ router_pick_trusteddirserver_impl(int requireother, int fascistfirewall)
   sl = smartlist_create();
   me = router_get_my_routerinfo();
 
+  if (!trusted_dir_servers)
+    return NULL;
+
   SMARTLIST_FOREACH(trusted_dir_servers, trusted_dir_server_t *, d,
     {
       if (!d->is_running) continue;