From 04cd7ede0f4c44ee8d49cb97931265ab7d75fc6e Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Sun, 13 Apr 2003 09:25:52 +0000 Subject: [PATCH] Fix warnings Original commit message from CVS: Fix warnings --- gst/gstparse.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gst/gstparse.c b/gst/gstparse.c index 241453c79b..88ca34bff3 100644 --- a/gst/gstparse.c +++ b/gst/gstparse.c @@ -263,8 +263,10 @@ make_links (graph_t *g, GError **error) b = c->sink_pads; caps = c->caps; - gst_caps_ref (caps); - gst_caps_sink (caps); + if (caps) { + gst_caps_ref (caps); + gst_caps_sink (caps); + } gst_caps_debug (caps, "foo"); /* g_print ("a: %p, b: %p\n", a, b); */ @@ -367,7 +369,9 @@ make_links (graph_t *g, GError **error) } } next: - gst_caps_unref (caps); + if (caps) { + gst_caps_unref (caps); + } l = g_list_next (l); }