From 99c24bafe1619e6ace7e89be2ddea2e8f2eaf98f Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 9 Oct 2008 14:47:22 +0200 Subject: Check for NULL stream --- audio/avdtp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/audio/avdtp.c b/audio/avdtp.c index 98cbbab4..1c6f8e67 100644 --- a/audio/avdtp.c +++ b/audio/avdtp.c @@ -2414,6 +2414,9 @@ gboolean avdtp_stream_remove_cb(struct avdtp *session, GSList *l; struct stream_callback *cb; + if (!stream) + return FALSE; + for (cb = NULL, l = stream->callbacks; l != NULL; l = l->next) { struct stream_callback *tmp = l->data; if (tmp && tmp->id == id) { -- cgit