summaryrefslogtreecommitdiffstats
path: root/switch.c
diff options
context:
space:
mode:
Diffstat (limited to 'switch.c')
-rw-r--r--switch.c2
1 files changed, 1 insertions, 1 deletions
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);
}
}