summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2020-04-02 15:25:13 +0200
committerWim Taymans <wtaymans@redhat.com>2020-04-02 15:25:13 +0200
commita86f70c13dafb91abeb12ade0d421125679ae942 (patch)
tree38809b50669b96cb6a4bad791157193cd191cce8 /src/modules
parentb87c0a92703b1c68423a2e3abfa8737ecfb1ce7e (diff)
protocol-native: avoid destroying NULL source
The source might have been destroyed before.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/module-protocol-native.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/module-protocol-native.c b/src/modules/module-protocol-native.c
index 7ea3c855..86a5431b 100644
--- a/src/modules/module-protocol-native.c
+++ b/src/modules/module-protocol-native.c
@@ -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");
- pw_loop_destroy_source(loop, impl->source);
- impl->source = NULL;
+ if (impl->source) {
+ pw_loop_destroy_source(loop, impl->source);
+ impl->source = NULL;
+ }
}
static void on_need_flush(void *data)