a2dp-sink/source: don't crash if transport went away

This commit is contained in:
Pauli Virtanen 2020-12-30 16:31:55 +02:00
parent 24c68b0067
commit c39ba8570e
2 changed files with 4 additions and 0 deletions

View file

@ -923,6 +923,8 @@ impl_node_port_enum_params(void *object, int seq,
case SPA_PARAM_EnumFormat:
if (this->codec == NULL)
return -EIO;
if (this->transport == NULL)
return -EIO;
if ((res = this->codec->enum_config(this->codec,
this->transport->configuration,

View file

@ -757,6 +757,8 @@ impl_node_port_enum_params(void *object, int seq,
return 0;
if (this->codec == NULL)
return -EIO;
if (this->transport == NULL)
return -EIO;
if ((res = this->codec->enum_config(this->codec,
this->transport->configuration,