aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-10-14 03:44:45 +0000
committerNick Mathewson <nickm@torproject.org>2004-10-14 03:44:45 +0000
commitbd10bf4b5bbe022f85bbf8d56e6afa50ad76bf60 (patch)
tree429e8aa256b2b368560f507808a9befe67aeb9ce /src/or/circuitbuild.c
parent89280e6c2012de729a41dcea8fe6ba0d4d0a5530 (diff)
downloadtor-bd10bf4b5bbe022f85bbf8d56e6afa50ad76bf60.tar
tor-bd10bf4b5bbe022f85bbf8d56e6afa50ad76bf60.tar.gz
Try to always dtrt if routerlist==NULL
svn:r2489
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r--src/or/circuitbuild.c2
1 files changed, 2 insertions, 0 deletions
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;