mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
client-node: handle NULL port
Don't try to remove an already removed port.
This commit is contained in:
parent
a7d8e805ac
commit
fdb3985f1a
1 changed files with 2 additions and 3 deletions
|
|
@ -497,9 +497,6 @@ clear_port(struct node *this, struct port *port)
|
|||
|
||||
spa_log_debug(this->log, NAME" %p: clear port %p", this, port);
|
||||
|
||||
if (port == NULL)
|
||||
return;
|
||||
|
||||
do_update_port(this, port,
|
||||
PW_CLIENT_NODE_PORT_UPDATE_PARAMS |
|
||||
PW_CLIENT_NODE_PORT_UPDATE_INFO, 0, NULL, NULL);
|
||||
|
|
@ -966,6 +963,8 @@ client_node_port_update(void *data,
|
|||
port = GET_PORT(this, direction, port_id);
|
||||
|
||||
if (remove) {
|
||||
if (port == NULL)
|
||||
return 0;
|
||||
port->destroyed = true;
|
||||
clear_port(this, port);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue