mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
card: Don't crash if someone gives NULL name to pa_card_set_profile().
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.
This commit is contained in:
parent
5f62cf8f40
commit
21c6c70438
1 changed files with 1 additions and 1 deletions
|
|
@ -228,7 +228,7 @@ int pa_card_set_profile(pa_card *c, const char *name, pa_bool_t save) {
|
|||
return -PA_ERR_NOTIMPLEMENTED;
|
||||
}
|
||||
|
||||
if (!c->profiles)
|
||||
if (!c->profiles || !name)
|
||||
return -PA_ERR_NOENTITY;
|
||||
|
||||
if (!(profile = pa_hashmap_get(c->profiles, name)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue