* in #GST_EVENT_STREAM_START, #GST_EVENT_STREAM_COLLECTION or
* #GST_MESSSAGE_STREAM_COLLECTION.
*
- * Returns: (transfer full): a new select-streams event.
+ * Note: The list of @streams can not be empty.
+ *
+ * Returns: (transfer full): a new select-streams event or %NULL in case of
+ * an error (like an empty streams list).
*
* Since: 1.10
*/
GstStructure *struc;
GList *tmpl;
+ g_return_val_if_fail (streams != NULL, NULL);
+
GST_CAT_INFO (GST_CAT_EVENT, "Creating new select-streams event");
struc = gst_structure_new_id_empty (GST_QUARK (EVENT_SELECT_STREAMS));
g_value_init (&val, GST_TYPE_LIST);