Przeglądaj źródła

* Fix possible crash in fatal()

Bryan Drewery 16 lat temu
rodzic
commit
c2a6318275
1 zmienionych plików z 1 dodań i 1 usunięć
  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)
     listen_all(my_port, 1); /* close the listening port... */
 
-  if (conf.bot->localhub)
+  if (conf.bot && conf.bot->localhub)
     unlink(conf.localhub_socket);
 
   sdprintf(STR("Closing %d sockets"), dcc_total);