summaryrefslogtreecommitdiff
path: root/plugins/elements/gstinputselector.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/elements/gstinputselector.c')
-rw-r--r--plugins/elements/gstinputselector.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/elements/gstinputselector.c b/plugins/elements/gstinputselector.c
index 0d6d0ffef..b8bc3b44c 100644
--- a/plugins/elements/gstinputselector.c
+++ b/plugins/elements/gstinputselector.c
@@ -307,9 +307,13 @@ gst_selector_pad_get_property (GObject * object, guint prop_id,
GstInputSelector *sel;
sel = GST_INPUT_SELECTOR (gst_pad_get_parent (spad));
- g_value_set_boolean (value, gst_input_selector_is_active_sinkpad (sel,
- GST_PAD_CAST (spad)));
- gst_object_unref (sel);
+ if (sel) {
+ g_value_set_boolean (value, gst_input_selector_is_active_sinkpad (sel,
+ GST_PAD_CAST (spad)));
+ gst_object_unref (sel);
+ } else {
+ g_value_set_boolean (value, FALSE);
+ }
break;
}
case PROP_PAD_ALWAYS_OK: