diff --git a/gst/compositor/compositor.c b/gst/compositor/compositor.c index d3e1daa20a..12e24d1896 100644 --- a/gst/compositor/compositor.c +++ b/gst/compositor/compositor.c @@ -433,7 +433,10 @@ gst_compositor_pad_prepare_frame (GstVideoAggregatorPad * pad, /* Check if this frame is obscured by a higher-zorder frame * TODO: Also skip a frame if it's obscured by a combination of * higher-zorder frames */ - l = g_list_find (GST_ELEMENT (vagg)->sinkpads, pad)->next; + l = g_list_find (GST_ELEMENT (vagg)->sinkpads, pad); + /* The pad might've just been removed */ + if (l) + l = l->next; for (; l; l = l->next) { if (_pad_obscures_rectangle (vagg, l->data, frame_rect)) { frame_obscured = TRUE;