Browse Source

don't crash now that LongLivedPorts can be null

svn:r4923
Roger Dingledine 20 years ago
parent
commit
780261aa2e
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/common/container.c

+ 1 - 0
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;