diff options
Diffstat (limited to 'stream')
-rw-r--r-- | stream/stream.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/stream/stream.c b/stream/stream.c index d4dea4486f..ca17fa787f 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -885,8 +885,10 @@ struct mp_cancel { static void cancel_destroy(void *p) { struct mp_cancel *c = p; - close(c->wakeup_pipe[0]); - close(c->wakeup_pipe[1]); + if (c->wakeup_pipe[0] >= 0) { + close(c->wakeup_pipe[0]); + close(c->wakeup_pipe[1]); + } } struct mp_cancel *mp_cancel_new(void *talloc_ctx) |