From 1eb80fbcadb8b9510fde46cd660173d89bb86062 Mon Sep 17 00:00:00 2001 From: Jaska Uimonen Date: Mon, 29 Dec 2014 11:22:56 +0200 Subject: [PATCH] check for NULL origin It seems that there can be sink-input existing without origin, so we have to check for the origins existence. Change-Id: I60a80c3fe06bab80e1a7934f2aa0ff9ff84209a9 --- murphy/fader.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/murphy/fader.c b/murphy/fader.c index 22c8bb4..c4b6139 100644 --- a/murphy/fader.c +++ b/murphy/fader.c @@ -118,7 +118,10 @@ void pa_fader_apply_volume_limits(struct userdata *u, uint32_t stamp) origin = pa_utils_get_stream_origin(u, sinp); stream_node = pa_discover_find_node_by_ptr(u, origin); - if ((class = pa_utils_get_stream_class(sinp->proplist)) > 0) { + if (origin == NULL) { + pa_log_debug("could not find origin for sink-input %d", sinp->index); + } + else if ((class = pa_utils_get_stream_class(sinp->proplist)) > 0) { corked = stream_node ? !stream_node->rset.grant : false; muted = (sinp->muted || pa_hashmap_get(sinp->volume_factor_items, -- 2.7.4