mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-17 14:58:09 +02:00
m-simple-policy: find_endpoint: ref the endpoint only if it's not NULL
This commit is contained in:
parent
d236fea23d
commit
2da44762df
1 changed files with 2 additions and 2 deletions
|
|
@ -294,8 +294,8 @@ simple_policy_find_endpoint (WpPolicy *policy, GVariant *props,
|
|||
}
|
||||
|
||||
/* If not found, return the first endpoint */
|
||||
ep = (ptr_array->len > 1) ? g_ptr_array_index (ptr_array, 0) : NULL;
|
||||
return g_object_ref (ep);
|
||||
return (ptr_array->len > 1) ?
|
||||
g_object_ref (g_ptr_array_index (ptr_array, 0)) : NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue