Do not check for httpd->server_fd6 if it is not initialized
[deb_shairplay.git] / src / lib / httpd.c
index 7606933696e1cb8548dc57e326bd346221a831d5..88971faa5f57451b22d58a1959da108bd9229e68 100644 (file)
@@ -240,7 +240,7 @@ httpd_thread(void *arg)
                                continue;
                        }
                }
-               if (FD_ISSET(httpd->server_fd6, &rfds)) {
+               if (httpd->server_fd6 != -1 && FD_ISSET(httpd->server_fd6, &rfds)) {
                        ret = httpd_accept_connection(httpd, httpd->server_fd6, 1);
                        if (ret == -1) {
                                break;