In my opinion, pa_card_set_profile() should assert that name
is not NULL, and it would be the job of the client interface
to filter out NULLs from the client input, but this is done
this way also when setting sink and source ports, so for
consistency I'll do this this way for now.
return -PA_ERR_NOTIMPLEMENTED;
}
- if (!c->profiles)
+ if (!c->profiles || !name)
return -PA_ERR_NOENTITY;
if (!(profile = pa_hashmap_get(c->profiles, name)))