浏览代码

* Fix possible crash in fatal()

Bryan Drewery 17 年之前
父节点
当前提交
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);