bluez5: handle info == NULL when parsing codecs

This commit is contained in:
Wim Taymans 2021-02-16 17:57:21 +01:00
parent 23823867b0
commit 344eb2baa3

View file

@ -2940,7 +2940,7 @@ static int parse_codec_array(struct spa_bt_monitor *this, const struct spa_dict
if (codecs == NULL)
return -ENOMEM;
if ((str = spa_dict_lookup(info, "bluez5.codecs")) == NULL)
if (info == NULL || (str = spa_dict_lookup(info, "bluez5.codecs")) == NULL)
goto fallback;
spa_json_init(&it, str, strlen(str));