summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/nle/nlesource.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/nle/nlesource.c b/plugins/nle/nlesource.c
index 3217e0b7..0fa35c8c 100644
--- a/plugins/nle/nlesource.c
+++ b/plugins/nle/nlesource.c
@@ -488,6 +488,8 @@ nle_source_prepare (NleObject * object)
if (!priv->staticpad && !(get_valid_src_pad (source, source->element, &pad))) {
GST_DEBUG_OBJECT (source, "Couldn't find a valid source pad");
+ gst_object_unref (parent);
+ return FALSE;
} else {
if (priv->staticpad)
pad = gst_object_ref (priv->staticpad);