Ver Fonte

Fix crash on doflood(NULL)

Bryan Drewery há 12 anos atrás
pai
commit
af8e8b65d9
1 ficheiros alterados com 3 adições e 0 exclusões
  1. 3 0
      src/flags.c

+ 3 - 0
src/flags.c

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