Handle sink->session == NULL && session == NULL correctly in sink_setup_stream

This commit is contained in:
Johan Hedberg 2009-03-25 00:16:32 +02:00
parent e6f892a966
commit 3cb26e9bcf

View File

@ -487,6 +487,9 @@ gboolean sink_setup_stream(struct sink *sink, struct avdtp *session)
if (session && !sink->session)
sink->session = avdtp_ref(session);
if (!sink->session)
return FALSE;
if (avdtp_discover(sink->session, discovery_complete, sink) < 0)
return FALSE;