don't segfault when we're trying to build a testing circ to ourselves

svn:r10318
This commit is contained in:
Roger Dingledine 2007-05-24 23:38:14 +00:00
parent 6243cb2b71
commit f93226e3dc
1 changed files with 4 additions and 2 deletions

View File

@ -2328,8 +2328,10 @@ choose_random_entry(cpath_build_state_t *state)
int need_uptime = state->need_uptime;
int need_capacity = state->need_capacity;
smartlist_add(exit_family, chosen_exit);
routerlist_add_family(exit_family, chosen_exit);
if (chosen_exit) {
smartlist_add(exit_family, chosen_exit);
routerlist_add_family(exit_family, chosen_exit);
}
if (!entry_guards)
entry_guards = smartlist_create();