[telepathy-gabble/master] make_stream_list requires session != NULL

Will Thompson will.thompson at collabora.co.uk
Mon May 11 08:43:12 PDT 2009


---
 src/media-channel.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/media-channel.c b/src/media-channel.c
index f7cac1f..84d6c4a 100644
--- a/src/media-channel.c
+++ b/src/media-channel.c
@@ -1002,7 +1002,13 @@ gabble_media_channel_get_session_handlers (TpSvcChannelInterfaceMediaSignalling
   g_ptr_array_free (ret, TRUE);
 }
 
-
+/**
+ * make_stream_list:
+ *
+ * Creates an array of MediaStreamInfo structs.
+ *
+ * Precondition: priv->session is non-NULL.
+ */
 static GPtrArray *
 make_stream_list (GabbleMediaChannel *self,
                   guint len,
@@ -1013,6 +1019,8 @@ make_stream_list (GabbleMediaChannel *self,
   guint i;
   GType info_type = TP_STRUCT_TYPE_MEDIA_STREAM_INFO;
 
+  g_assert (priv->session != NULL);
+
   ret = g_ptr_array_sized_new (len);
 
   for (i = 0; i < len; i++)
-- 
1.5.6.5




More information about the telepathy-commits mailing list