context: protect against bad context state

Avoid crash in firefox when daemon is stopped.
This commit is contained in:
Wim Taymans 2020-10-23 17:10:19 +02:00
parent 42e60b66f3
commit 732bf4b58c
2 changed files with 9 additions and 0 deletions

View file

@ -660,6 +660,7 @@ static void stream_unlink(pa_stream *s)
if (o->stream == s)
pa_operation_cancel(o);
}
s->drain = NULL;
spa_list_remove(&s->link);
if (s->stream)