diff --git a/spa/plugins/bluez5/a2dp-sink.c b/spa/plugins/bluez5/a2dp-sink.c index 3775acaeb..aa0b4f3b0 100644 --- a/spa/plugins/bluez5/a2dp-sink.c +++ b/spa/plugins/bluez5/a2dp-sink.c @@ -254,7 +254,8 @@ static int impl_node_enum_params(void *object, int seq, if (enum_codec) { int res; - if (this->codec->enum_props == NULL || this->codec_props == NULL) + if (this->codec->enum_props == NULL || this->codec_props == NULL || + this->transport == NULL) return 0; else if ((res = this->codec->enum_props(this->codec_props, this->transport->device->settings, diff --git a/spa/plugins/bluez5/a2dp-source.c b/spa/plugins/bluez5/a2dp-source.c index 2d95ae369..cd23dffae 100644 --- a/spa/plugins/bluez5/a2dp-source.c +++ b/spa/plugins/bluez5/a2dp-source.c @@ -239,7 +239,8 @@ static int impl_node_enum_params(void *object, int seq, if (enum_codec) { int res; - if (this->codec->enum_props == NULL || this->codec_props == NULL) + if (this->codec->enum_props == NULL || this->codec_props == NULL || + this->transport == NULL) return 0; else if ((res = this->codec->enum_props(this->codec_props, this->transport->device->settings,