mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-10-06 16:09:43 +00:00
context: handle NULL data loops
It's possible that the data loop failed to initialize and we should try to avoid segfaulting on that.
This commit is contained in:
parent
6a26e6dd3f
commit
1255d88969
|
@ -117,8 +117,9 @@ static int context_set_freewheel(struct pw_context *context, bool freewheel)
|
|||
int res = 0;
|
||||
|
||||
for (i = 0; i < impl->n_data_loops; i++) {
|
||||
if ((thr = pw_data_loop_get_thread(impl->data_loops[i].impl)) == NULL)
|
||||
return -EIO;
|
||||
if (impl->data_loops[i].impl == NULL ||
|
||||
(thr = pw_data_loop_get_thread(impl->data_loops[i].impl)) == NULL)
|
||||
continue;
|
||||
|
||||
if (freewheel) {
|
||||
pw_log_info("%p: enter freewheel", context);
|
||||
|
|
Loading…
Reference in a new issue