media: require an element in media constructor
authorWim Taymans <wim.taymans@collabora.co.uk>
Thu, 29 Nov 2012 16:20:26 +0000 (17:20 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 29 Nov 2012 16:20:26 +0000 (17:20 +0100)
gst/rtsp-server/rtsp-media.c

index 0165769..2258cca 100644 (file)
@@ -376,6 +376,8 @@ gst_rtsp_media_new (GstElement * element)
 {
   GstRTSPMedia *result;
 
+  g_return_val_if_fail (GST_IS_ELEMENT (element), NULL);
+
   result = g_object_new (GST_TYPE_RTSP_MEDIA, NULL);
   result->priv->element = element;