summaryrefslogtreecommitdiff
path: root/audio/sink.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-04-15 23:11:26 +0300
committerJohan Hedberg <johan.hedberg@nokia.com>2009-04-15 23:11:26 +0300
commitd2fe0f577fc6fcf94507b1fde1098ba441c296a6 (patch)
tree0ff3dac3d541c0d8061052cdd8d081c78ca8f5e4 /audio/sink.c
parentf1af647c4beee2c5f13f454516a9f0d96aacf6ab (diff)
downloadbluez-d2fe0f577fc6fcf94507b1fde1098ba441c296a6.tar.gz
Fix a2dp_source_get error checking
Diffstat (limited to 'audio/sink.c')
-rw-r--r--audio/sink.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/audio/sink.c b/audio/sink.c
index 5f3032dcd..056d1a552 100644
--- a/audio/sink.c
+++ b/audio/sink.c
@@ -486,6 +486,11 @@ static void discovery_complete(struct avdtp *session, GSList *seps, struct avdtp
}
sep = a2dp_source_get(session, rsep);
+ if (!sep) {
+ error("Unable to get a local source SEP");
+ goto failed;
+ }
+
id = a2dp_source_config(sink->session, sep, stream_setup_complete,
caps, sink);
if (id == 0)