protocol-native: avoid destroying NULL source

The source might have been destroyed before.
This commit is contained in:
Wim Taymans 2020-04-02 15:25:13 +02:00
parent b87c0a9270
commit a86f70c13d

View file

@ -713,8 +713,10 @@ error:
pw_proxy_notify((struct pw_proxy*)this,
struct pw_core_events, error, 0, 0,
this->recv_seq, res, "connection error");
if (impl->source) {
pw_loop_destroy_source(loop, impl->source);
impl->source = NULL;
}
}
static void on_need_flush(void *data)