bluez: Fix crash on gstreamer plugin if device doesn't support sbc

This commit is contained in:
Luiz Augusto von Dentz 2010-09-13 15:40:11 +03:00 committed by Tim-Philipp Müller
parent 31fe375174
commit 651e1be7ef

View file

@ -442,6 +442,9 @@ gst_avdtp_sink_parse_sbc_caps (GstAvdtpSink * self, sbc_capabilities_t * sbc)
GValue *list; GValue *list;
gboolean mono, stereo; gboolean mono, stereo;
if (sbc == NULL)
return NULL;
structure = gst_structure_empty_new ("audio/x-sbc"); structure = gst_structure_empty_new ("audio/x-sbc");
value = g_value_init (g_new0 (GValue, 1), G_TYPE_STRING); value = g_value_init (g_new0 (GValue, 1), G_TYPE_STRING);