diff --git a/sndiod/file.c b/sndiod/file.c index 8e2cc49..bb2fc99 100644 --- a/sndiod/file.c +++ b/sndiod/file.c @@ -383,7 +383,8 @@ file_poll(void) #ifdef DEBUG clock_gettime(CLOCK_MONOTONIC, &ts0); #endif - revents = f->ops->revents(f->arg, f->pfd); + revents = (f->state != FILE_ZOMB) ? + f->ops->revents(f->arg, f->pfd) : 0; if ((revents & POLLHUP) && (f->state != FILE_ZOMB)) f->ops->hup(f->arg); if ((revents & POLLIN) && (f->state != FILE_ZOMB))