diff --git a/src/audio/pipeline/pipeline-graph.c b/src/audio/pipeline/pipeline-graph.c index 8b21774c6d19..10b6c1cc9ed3 100644 --- a/src/audio/pipeline/pipeline-graph.c +++ b/src/audio/pipeline/pipeline-graph.c @@ -321,13 +321,20 @@ static int pipeline_comp_reset(struct comp_dev *current, { struct pipeline *p = ctx->comp_data; struct pipeline *p_current = current->pipeline; - int is_single_ppl = comp_is_single_pipeline(current, p->source_comp); int is_same_sched = pipeline_is_same_sched_comp(p_current, p); + int is_single_ppl; int err; pipe_dbg(p_current, "pipeline_comp_reset(), current->comp.id = 0x%x, dir = %u", dev_comp_id(current), dir); + if (!p->source_comp) { + pipe_err(p, "pipeline_comp_reset(): source_comp is NULL"); + return -EINVAL; + } + + is_single_ppl = comp_is_single_pipeline(current, p->source_comp); + /* * Reset should propagate to the connected pipelines, which need to be * scheduled together, except for IPC4, where each pipeline receives