Commit fc41af5c authored by Julian Bouzas's avatar Julian Bouzas
Browse files

m-mixer-api: make sure the enum param iterator is valid

Some audio nodes such as null-audio-sink nodes don't support Props or Route enum
params.
parent 188a10e0
Pipeline #322608 passed with stages
in 1 minute and 14 seconds
......@@ -191,7 +191,7 @@ collect_node_info (WpMixerApi * self, struct node_info *info,
g_auto (GValue) val = G_VALUE_INIT;
it = wp_pipewire_object_enum_params_sync (dev, "Route", NULL);
for (; wp_iterator_next (it, &val); g_value_unset (&val)) {
for (; it && wp_iterator_next (it, &val); g_value_unset (&val)) {
WpSpaPod *param = g_value_get_boxed (&val);
gint32 r_index = -1, r_device = -1;
g_autoptr (WpSpaPod) props = NULL;
......@@ -220,7 +220,7 @@ collect_node_info (WpMixerApi * self, struct node_info *info,
g_auto (GValue) val = G_VALUE_INIT;
it = wp_pipewire_object_enum_params_sync (node, "Props", NULL);
for (; wp_iterator_next (it, &val); g_value_unset (&val)) {
for (; it && wp_iterator_next (it, &val); g_value_unset (&val)) {
WpSpaPod *param = g_value_get_boxed (&val);
if (node_info_fill (info, param))
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment