mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
a2dp: guard against transport NULL
The transport can become NULL so check that and don't try to deref it.
This commit is contained in:
parent
6df8ce3031
commit
594f67ec04
2 changed files with 4 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue