From 780261aa2eefcb478fa7d4088947c81d9a1e6152 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Thu, 8 Sep 2005 06:47:27 +0000 Subject: [PATCH] don't crash now that LongLivedPorts can be null svn:r4923 --- src/common/container.c | 1 + 1 file changed, 1 insertion(+) 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;