Просмотр исходного кода

* Fix possible crash in fatal()

Bryan Drewery 16 лет назад
Родитель
Сommit
c2a6318275
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/main.c

+ 1 - 1
src/main.c

@@ -192,7 +192,7 @@ void fatal(const char *s, int recoverable)
   if (my_port)
   if (my_port)
     listen_all(my_port, 1); /* close the listening port... */
     listen_all(my_port, 1); /* close the listening port... */
 
 
-  if (conf.bot->localhub)
+  if (conf.bot && conf.bot->localhub)
     unlink(conf.localhub_socket);
     unlink(conf.localhub_socket);
 
 
   sdprintf(STR("Closing %d sockets"), dcc_total);
   sdprintf(STR("Closing %d sockets"), dcc_total);