diff --git a/spa/plugins/bluez5/a2dp-sink.c b/spa/plugins/bluez5/a2dp-sink.c index 7efe8de41..16a184754 100644 --- a/spa/plugins/bluez5/a2dp-sink.c +++ b/spa/plugins/bluez5/a2dp-sink.c @@ -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, diff --git a/spa/plugins/bluez5/a2dp-source.c b/spa/plugins/bluez5/a2dp-source.c index 471fd96cd..84a8a5e9f 100644 --- a/spa/plugins/bluez5/a2dp-source.c +++ b/spa/plugins/bluez5/a2dp-source.c @@ -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,