mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
bluez5: don't crash when proxy is not created yet
We export a node and get a handle (of type ClientNode). The session manager then later creates a proxy for the new object. We can't assume the proxy is created yet when the device emits an event so check for this. This is a temporary bandaid. We should likely use get_node() to create our own proxy for this purpose. Fixes #552
This commit is contained in:
parent
d87f838e09
commit
86576f1e63
1 changed files with 6 additions and 1 deletions
|
|
@ -249,7 +249,12 @@ static void bluez_device_event(void *data, const struct spa_event *event)
|
|||
|
||||
switch (type) {
|
||||
case SPA_DEVICE_EVENT_ObjectConfig:
|
||||
if (props)
|
||||
/* FIXME, proxy might be NULL at this point until the
|
||||
* node proxy is created. We should probably do
|
||||
* pw_client_node_get_node() and perform the set_param on
|
||||
* that node proxy instead of waiting for the session manager
|
||||
* proxy. */
|
||||
if (props != NULL && node->snode->obj.proxy != NULL)
|
||||
pw_node_set_param((struct pw_node*)node->snode->obj.proxy,
|
||||
SPA_PARAM_Props, 0, props);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue