From de1e991decb15b589f1c8be4330c3a473eb31f30 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Mon, 20 Jul 2009 11:04:05 +0300 Subject: [PATCH] binaryregistry: don't unref NULL if we have an early read error --- gst/gstregistrybinary.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gst/gstregistrybinary.c b/gst/gstregistrybinary.c index 78b90e1616..d305948b34 100644 --- a/gst/gstregistrybinary.c +++ b/gst/gstregistrybinary.c @@ -1045,10 +1045,12 @@ gst_registry_binary_load_feature (GstRegistry * registry, gchar ** in, fail: GST_INFO ("Reading plugin feature failed"); g_free (type_name); - if (GST_IS_OBJECT (feature)) - gst_object_unref (feature); - else - g_object_unref (feature); + if (feature) { + if (GST_IS_OBJECT (feature)) + gst_object_unref (feature); + else + g_object_unref (feature); + } return FALSE; }