diff --git a/fanout.c b/fanout.c
index e2f7523af8a8dd945afab517b899e3ef692241fc..b18de4f5ae181e029adbb9bedaf50b1051105899 100644
--- a/fanout.c
+++ b/fanout.c
@@ -566,7 +566,7 @@ void client_process_input_buffer (struct client *c)
         } else {
             action = strtok (line, " ");
             channel = strtok (NULL, " ");
-            if (action == NULL) {
+            if (action == NULL || channel == NULL) {
                 fanout_debug (3, "received garbage from client\n");
             } else {
                 if ( ! strcmp (action, "announce")) {