mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
client-node: do check for data_loop
so that we don't crash on older pipewire. See #3243
This commit is contained in:
parent
5e2a7dbc4e
commit
0dcbbcad01
2 changed files with 8 additions and 0 deletions
|
|
@ -1699,6 +1699,11 @@ struct pw_impl_client_node *pw_impl_client_node_new(struct pw_resource *resource
|
||||||
if (this->node == NULL)
|
if (this->node == NULL)
|
||||||
goto error_no_node;
|
goto error_no_node;
|
||||||
|
|
||||||
|
if (this->node->data_loop == NULL) {
|
||||||
|
errno = EIO;
|
||||||
|
goto error_no_node;
|
||||||
|
}
|
||||||
|
|
||||||
impl->data_loop = this->node->data_loop->loop;
|
impl->data_loop = this->node->data_loop->loop;
|
||||||
impl->data_system = this->node->data_loop->system;
|
impl->data_system = this->node->data_loop->system;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1187,6 +1187,9 @@ static struct pw_proxy *node_export(struct pw_core *core, void *object, bool do_
|
||||||
struct pw_proxy *client_node;
|
struct pw_proxy *client_node;
|
||||||
struct node_data *data;
|
struct node_data *data;
|
||||||
|
|
||||||
|
if (node->data_loop == NULL)
|
||||||
|
goto error;
|
||||||
|
|
||||||
user_data_size = SPA_ROUND_UP_N(user_data_size, __alignof__(struct node_data));
|
user_data_size = SPA_ROUND_UP_N(user_data_size, __alignof__(struct node_data));
|
||||||
|
|
||||||
client_node = pw_core_create_object(core,
|
client_node = pw_core_create_object(core,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue