From bd10bf4b5bbe022f85bbf8d56e6afa50ad76bf60 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 14 Oct 2004 03:44:45 +0000 Subject: Try to always dtrt if routerlist==NULL svn:r2489 --- src/or/circuitbuild.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/or/circuitbuild.c') diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 56949da5d..b52f90dba 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -989,6 +989,8 @@ onion_new_cpath_build_state(uint8_t purpose, const char *exit_digest) cpath_build_state_t *info; routerinfo_t *exit; router_get_routerlist(&rl); + if (!rl) + return NULL; r = new_route_len(options.PathlenCoinWeight, purpose, rl->routers); if (r < 1) /* must be at least 1 */ return NULL; -- cgit v1.2.3