X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=switch.c;fp=switch.c;h=e3b545135f1f2ff21e61721c1ffcd5300bed7da2;hb=cc70e0ae30920ca835bf011f8040afb6fea43f45;hp=8111068af502c4fc063fc10e35d331b084f2cbdd;hpb=2478974dfde05063cbf0233e3d3c434ca2f46c7c;p=staging%2Fagl-audio-plugin.git diff --git a/switch.c b/switch.c index 8111068..e3b5451 100644 --- a/switch.c +++ b/switch.c @@ -107,6 +107,7 @@ bool agl_switch_setup_link (struct userdata *u, agl_node *from, agl_node *to, bo /* STREAM TO DEVICE : OK */ case agl_stream: sink = agl_utils_get_alsa_sink (u, to->paname); + if (!sink) break; source = agl_utils_get_null_source (u, from->nullsink); from->loopnode = agl_loopnode_create (u, AGL_LOOPNODE_SINK, from->index, source->index, sink->index); @@ -147,7 +148,6 @@ bool agl_switch_setup_link (struct userdata *u, agl_node *from, agl_node *to, bo sink = agl_utils_get_primary_alsa_sink (u); source = agl_utils_get_null_source (u, from->nullsink); - from->loopnode = agl_loopnode_create (u, AGL_LOOPNODE_SINK, from->index, source->index, sink->index); } }