client-node: only clear ports once

This commit is contained in:
Wim Taymans 2018-08-14 16:53:05 +02:00
parent 954da89756
commit d4ab36d52a

View file

@ -557,13 +557,17 @@ clear_port(struct node *this, struct port *port)
}
if (port->direction == SPA_DIRECTION_INPUT) {
if (this->in_ports[port->id] == port) {
this->in_ports[port->id] = NULL;
this->n_inputs--;
}
}
else {
if (this->out_ports[port->id] == port) {
this->out_ports[port->id] = NULL;
this->n_outputs--;
}
}
}
static int