summaryrefslogtreecommitdiff
path: root/gst/videocrop/gstaspectratiocrop.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/videocrop/gstaspectratiocrop.c')
-rw-r--r--gst/videocrop/gstaspectratiocrop.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gst/videocrop/gstaspectratiocrop.c b/gst/videocrop/gstaspectratiocrop.c
index 10d0499aa..037d32645 100644
--- a/gst/videocrop/gstaspectratiocrop.c
+++ b/gst/videocrop/gstaspectratiocrop.c
@@ -464,8 +464,10 @@ gst_aspect_ratio_crop_set_property (GObject * object, guint prop_id,
if (recheck) {
GstCaps *caps = gst_pad_get_current_caps (aspect_ratio_crop->sink);
- gst_aspect_ratio_crop_set_caps (aspect_ratio_crop, caps);
- gst_caps_unref (caps);
+ if (caps != NULL) {
+ gst_aspect_ratio_crop_set_caps (aspect_ratio_crop, caps);
+ gst_caps_unref (caps);
+ }
}
}