appending caps to themself is not fatal, is it?
authorBenjamin Otte <otte@gnome.org>
Sun, 17 Feb 2002 21:19:13 +0000 (21:19 +0000)
committerBenjamin Otte <otte@gnome.org>
Sun, 17 Feb 2002 21:19:13 +0000 (21:19 +0000)
Original commit message from CVS:
appending caps to themself is not fatal, is it?
If it is, revert the patch, but please allow gst_caps_append (NULL, NULL);

gst/gstcaps.c

index 9d3be71..75ecec2 100644 (file)
@@ -486,9 +486,7 @@ gst_caps_append (GstCaps *caps, GstCaps *capstoadd)
 {
   GstCaps *orig = caps;
   
-  g_return_val_if_fail (caps != capstoadd, caps);
-
-  if (caps == NULL)
+  if (caps == NULL || caps == capstoadd)
     return capstoadd;
   
   while (caps->next) {