mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-09-19 16:01:45 +00:00
alsa: handle plugin errors better
When the plugins can't be loaded, we fail to make a main_loop. Handle this case instead of segfaulting. See #1239
This commit is contained in:
parent
913434167d
commit
5a186ece01
|
@ -1015,6 +1015,10 @@ static int snd_pcm_pipewire_open(snd_pcm_t **pcmp, const char *name,
|
|||
}
|
||||
|
||||
pw->main_loop = pw_thread_loop_new("alsa-pipewire", NULL);
|
||||
if (pw->main_loop == NULL) {
|
||||
err = -errno;
|
||||
goto error;
|
||||
}
|
||||
loop = pw_thread_loop_get_loop(pw->main_loop);
|
||||
pw->system = loop->system;
|
||||
if ((pw->context = pw_context_new(loop, NULL, 0)) == NULL) {
|
||||
|
|
Loading…
Reference in a new issue