diff options
author | Roger Dingledine <arma@torproject.org> | 2005-09-08 06:47:27 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-09-08 06:47:27 +0000 |
commit | 780261aa2eefcb478fa7d4088947c81d9a1e6152 (patch) | |
tree | ff908c86c06c8fc418638cc72bff7e1dae612335 | |
parent | 8f37357193399050763ea5093419631d5c5f34e3 (diff) | |
download | tor-780261aa2eefcb478fa7d4088947c81d9a1e6152.tar.gz tor-780261aa2eefcb478fa7d4088947c81d9a1e6152.zip |
don't crash now that LongLivedPorts can be null
svn:r4923
-rw-r--r-- | src/common/container.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/common/container.c b/src/common/container.c index a231afdc86..ac10d60f0b 100644 --- a/src/common/container.c +++ b/src/common/container.c @@ -149,6 +149,7 @@ int smartlist_isin(const smartlist_t *sl, void *element) { int smartlist_string_isin(const smartlist_t *sl, const char *element) { int i; + if (!sl) return 0; for (i=0; i < sl->num_used; i++) if (strcmp((const char*)sl->list[i],element)==0) return 1; |