From 651e1be7ef5e4bdb8d19b431b104e349f0b70199 Mon Sep 17 00:00:00 2001
From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>
Date: Mon, 13 Sep 2010 15:40:11 +0300
Subject: [PATCH] bluez: Fix crash on gstreamer plugin if device doesn't
 support sbc

---
 sys/bluez/gstavdtpsink.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys/bluez/gstavdtpsink.c b/sys/bluez/gstavdtpsink.c
index c2e0b8fc92..6352483973 100644
--- a/sys/bluez/gstavdtpsink.c
+++ b/sys/bluez/gstavdtpsink.c
@@ -442,6 +442,9 @@ gst_avdtp_sink_parse_sbc_caps (GstAvdtpSink * self, sbc_capabilities_t * sbc)
   GValue *list;
   gboolean mono, stereo;
 
+  if (sbc == NULL)
+    return NULL;
+
   structure = gst_structure_empty_new ("audio/x-sbc");
   value = g_value_init (g_new0 (GValue, 1), G_TYPE_STRING);