Explorar o código

* Fix possible crash in fatal()

Bryan Drewery %!s(int64=16) %!d(string=hai) anos
pai
achega
c2a6318275
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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);