summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-12-13 17:14:54 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-12-13 17:14:54 +0100
commitde97cce689cb7214d7424c2a215693cef5f4b04a (patch)
tree92e11ebf3350463dd75a8b9bc4060bb1914e0142 /src
parent9cf61dffa6caf5a93cc91cc7e20c8fdfd5c67474 (diff)
downloadpa-sink-ctl-de97cce689cb7214d7424c2a215693cef5f4b04a.tar.gz
pa-sink-ctl-de97cce689cb7214d7424c2a215693cef5f4b04a.tar.bz2
pa-sink-ctl-de97cce689cb7214d7424c2a215693cef5f4b04a.zip
subscribe_cb: Check removed object to be known by us
Diffstat (limited to 'src')
-rw-r--r--src/pa-sink-ctl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pa-sink-ctl.c b/src/pa-sink-ctl.c
index c3ea04e..a8577f4 100644
--- a/src/pa-sink-ctl.c
+++ b/src/pa-sink-ctl.c
@@ -221,11 +221,15 @@ subscribe_cb(pa_context *c, pa_subscription_event_type_t t,
switch (t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) {
case PA_SUBSCRIPTION_EVENT_SINK:
object = find_sink_by_idx(ctx, idx);
+ if (object == NULL)
+ break;
ctx->sink_list = g_list_remove(ctx->sink_list, object);
sink_free(object);
break;
case PA_SUBSCRIPTION_EVENT_SINK_INPUT:
object = find_sink_input_by_idx(ctx, idx);
+ if (object == NULL)
+ break;
ctx->input_list = g_list_remove(ctx->input_list,
object);
sink_input_free(object);