From 5b0683d6cd103a7a91bc2e88bcc9f77750d10c25 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 22 Aug 2009 04:03:31 +0200 Subject: ladspa/remap: handle failing stream moves properly --- src/modules/module-ladspa-sink.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/modules/module-ladspa-sink.c') diff --git a/src/modules/module-ladspa-sink.c b/src/modules/module-ladspa-sink.c index 233f90c4..aa28f7fd 100644 --- a/src/modules/module-ladspa-sink.c +++ b/src/modules/module-ladspa-sink.c @@ -418,8 +418,11 @@ static void sink_input_moving_cb(pa_sink_input *i, pa_sink *dest) { pa_sink_input_assert_ref(i); pa_assert_se(u = i->userdata); - pa_sink_set_asyncmsgq(u->sink, dest->asyncmsgq); - pa_sink_update_flags(u->sink, PA_SINK_LATENCY|PA_SINK_DYNAMIC_LATENCY, dest->flags); + if (dest) { + pa_sink_set_asyncmsgq(u->sink, dest->asyncmsgq); + pa_sink_update_flags(u->sink, PA_SINK_LATENCY|PA_SINK_DYNAMIC_LATENCY, dest->flags); + } else + pa_sink_set_asyncmsgq(u->sink, NULL); } /* Called from main context */ -- cgit