simple-policy: fix bug when finding endpoints

This commit is contained in:
Julian Bouzas 2019-07-15 11:00:11 -04:00 committed by George Kiagiadakis
parent 755f0bd862
commit efbefe9e0e

View file

@ -471,7 +471,7 @@ simple_policy_find_endpoint (WpPolicy *policy, GVariant *props,
}
/* If not found, return the first endpoint */
ep = (ptr_array->len > 1) ?
ep = (ptr_array->len > 0) ?
g_object_ref (g_ptr_array_index (ptr_array, 0)) : NULL;
select_stream: