ges-layer: Don't use invalid layers

There's a possibility that there are no layers at that priority

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7116>
This commit is contained in:
Edward Hervey 2024-06-29 09:51:46 +02:00 committed by GStreamer Marge Bot
parent 5d7a35ca59
commit 734ca44805

View file

@ -239,7 +239,7 @@ update_gaps (GESTrack * track)
if (layer_prio != GES_TIMELINE_ELEMENT_NO_LAYER_PRIORITY) { if (layer_prio != GES_TIMELINE_ELEMENT_NO_LAYER_PRIORITY) {
GESLayer *layer = g_list_nth_data (priv->timeline->layers, layer_prio); GESLayer *layer = g_list_nth_data (priv->timeline->layers, layer_prio);
if (!ges_layer_get_active_for_track (layer, track)) if (!layer || !ges_layer_get_active_for_track (layer, track))
continue; continue;
} }
} }