Browse Source

make our tor_assert actually work when it's going to be triggered,
rather than seg fault


svn:r2368

Roger Dingledine 21 years ago
parent
commit
8385fdb590
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/common/log.c

+ 1 - 1
src/common/log.c

@@ -233,7 +233,7 @@ static void delete_log(logfile_t *victim) {
     logfiles = victim->next;
   else {
     for(tmpl = logfiles; tmpl && tmpl->next != victim; tmpl=tmpl->next) ;
-    tor_assert(tmpl->next == victim);
+    tor_assert(tmpl && tmpl->next == victim);
     tmpl->next = victim->next;
   }
   tor_free(victim->filename);