From e18ca6e9c831b429bb419c6c132b420da54a92c1 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 8 Oct 2019 23:47:02 +0200 Subject: [PATCH] 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. --- src/modules/module-protocol-native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/module-protocol-native.c b/src/modules/module-protocol-native.c index b1f86e5b2..ed343e793 100644 --- a/src/modules/module-protocol-native.c +++ b/src/modules/module-protocol-native.c @@ -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);