Add missing line; add similar check

svn:r2481
This commit is contained in:
Nick Mathewson 2004-10-14 02:29:03 +00:00
parent 8b325c142e
commit 92bb360ad7

View File

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