From: Javier Jard?n <javier.jardon@xxxxxxxxxxxxxxx> --- src/modules/rtp/module-rtp-recv.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/rtp/module-rtp-recv.c b/src/modules/rtp/module-rtp-recv.c index fe9cf5d..bc47dd2 100644 --- a/src/modules/rtp/module-rtp-recv.c +++ b/src/modules/rtp/module-rtp-recv.c @@ -407,12 +407,14 @@ static void sink_input_attach(pa_sink_input *i) { /* Called from I/O thread context */ static void sink_input_detach(pa_sink_input *i) { struct session *s; + pa_sink_input_assert_ref(i); pa_assert_se(s = i->userdata); - pa_assert(s->rtpoll_item); - pa_rtpoll_item_free(s->rtpoll_item); - s->rtpoll_item = NULL; + if (s->rtpoll_item) { + pa_rtpoll_item_free(s->rtpoll_item); + s->rtpoll_item = NULL; + } } static int mcast_socket(const struct sockaddr* sa, socklen_t salen) { -- 1.8.1.4