protocol-native: don't try to flush when the source is gone

When the connection is broken, we destroy the source avoid trying
to flush when the source is gone.
This commit is contained in:
Wim Taymans 2019-10-08 23:47:02 +02:00
parent 082463efd0
commit e18ca6e9c8

View file

@ -671,7 +671,7 @@ static void on_need_flush(void *data)
struct client *impl = data;
struct pw_remote *remote = impl->this.remote;
if (!impl->flushing) {
if (!impl->flushing && impl->source) {
int mask = impl->source->mask;
impl->flushing = true;
SPA_FLAG_SET(mask, SPA_IO_OUT);