alsa-plugin: handle context create error

This commit is contained in:
Wim Taymans 2021-05-10 13:28:36 +02:00
parent 7b759e7961
commit 0999f3cf93

View file

@ -1017,7 +1017,10 @@ static int snd_pcm_pipewire_open(snd_pcm_t **pcmp, const char *name,
pw->main_loop = pw_thread_loop_new("alsa-pipewire", NULL);
loop = pw_thread_loop_get_loop(pw->main_loop);
pw->system = loop->system;
pw->context = pw_context_new(loop, NULL, 0);
if ((pw->context = pw_context_new(loop, NULL, 0)) == NULL) {
err = -errno;
goto error;
}
props = pw_properties_new(NULL, NULL);