From 344eb2baa33e46a5c62e5f0b642055719f4921a8 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 16 Feb 2021 17:57:21 +0100 Subject: [PATCH] bluez5: handle info == NULL when parsing codecs --- spa/plugins/bluez5/bluez5-dbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spa/plugins/bluez5/bluez5-dbus.c b/spa/plugins/bluez5/bluez5-dbus.c index de9981608..e2e9b19ec 100644 --- a/spa/plugins/bluez5/bluez5-dbus.c +++ b/spa/plugins/bluez5/bluez5-dbus.c @@ -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));