OSDN Git Service

auto import from //branches/cupcake/...@132276
authorThe Android Open Source Project <initial-contribution@android.com>
Thu, 19 Feb 2009 18:57:29 +0000 (10:57 -0800)
committerThe Android Open Source Project <initial-contribution@android.com>
Thu, 19 Feb 2009 18:57:29 +0000 (10:57 -0800)
utils/audio/sink.c

index 31a54be..38ef2e6 100644 (file)
@@ -383,9 +383,11 @@ static void discovery_complete(struct avdtp *session, GSList *seps, struct avdtp
        return;
 
 failed:
-       if (pending->msg)
-               error_failed(pending->conn, pending->msg, "Stream setup failed");
-       pending_request_free(pending);
+       if (pending) {
+               if (pending->msg)
+                       error_failed(pending->conn, pending->msg, "Stream setup failed");
+               pending_request_free(pending);
+       }
        sink->connect = NULL;
        avdtp_unref(sink->session);
        sink->session = NULL;