Explorar el Código

Fix crash on doflood(NULL)

Bryan Drewery hace 12 años
padre
commit
af8e8b65d9
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      src/flags.c

+ 3 - 0
src/flags.c

@@ -535,6 +535,9 @@ dovoice(const struct chanset_t *chan)
 int
 int
 doflood(const struct chanset_t *chan)
 doflood(const struct chanset_t *chan)
 {
 {
+  if (!chan)
+    return 0;
+
   if (chan->role & ROLE_FLOOD)
   if (chan->role & ROLE_FLOOD)
     return 1;
     return 1;