adder: don't ref NULL caps
authorStefan Sauer <ensonic@users.sf.net>
Fri, 4 Nov 2011 21:00:43 +0000 (22:00 +0100)
committerStefan Sauer <ensonic@users.sf.net>
Fri, 4 Nov 2011 21:00:43 +0000 (22:00 +0100)
gst/adder/gstadder.c

index c1b02ea1086172d7aefe66f5e2c0610889d11c0f..84cfa707e8c0d0f6cc7f49cd1ac98aa8fbf6b5bc 100644 (file)
@@ -155,7 +155,7 @@ gst_adder_sink_getcaps (GstPad * pad, GstCaps * filter)
     else
       gst_caps_ref (filter_caps);
   } else {
-    filter_caps = gst_caps_ref (filter);
+    filter_caps = filter ? gst_caps_ref (filter) : NULL;
   }
   GST_OBJECT_UNLOCK (adder);