From: Jaska Uimonen Date: Mon, 29 Dec 2014 09:22:56 +0000 (+0200) Subject: check for NULL origin X-Git-Tag: accepted/tizen/ivi/20141231.002343~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1eb80fbcadb8b9510fde46cd660173d89bb86062;hp=2e1acff066d6d3734e3b4a7d1ba5fe21bf0a9d8a;p=profile%2Fivi%2Fpulseaudio-module-murphy-ivi.git 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 --- 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,