From: Thibault Saunier Date: Mon, 10 Oct 2016 22:59:47 +0000 (+0200) Subject: track-element: Avoid dereferencing NULL pointer X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4432efcfad04cc87ea944f860d22c449b02df26d;p=platform%2Fupstream%2Fgst-editing-services.git track-element: Avoid dereferencing NULL pointer We set TrackElement track type very early when creating effects so it now uses that information to find TrackElement in clips by track type. Reviewed-by: Alex Băluț Differential Revision: https://phabricator.freedesktop.org/D1370 --- diff --git a/ges/ges-clip.c b/ges/ges-clip.c index d0b47fa..b810156 100644 --- a/ges/ges-clip.c +++ b/ges/ges-clip.c @@ -1623,7 +1623,7 @@ ges_clip_find_track_elements (GESClip * clip, GESTrack * track, tmptrack = ges_track_element_get_track (otmp); if (((track != NULL && tmptrack == track)) || (track_type != GES_TRACK_TYPE_UNKNOWN - && tmptrack->type == track_type)) { + && ges_track_element_get_track_type (otmp) == track_type)) { foundElement = GES_TRACK_ELEMENT (tmp->data); diff --git a/ges/ges-track-element.c b/ges/ges-track-element.c index 6fe5c9b..21f6ca4 100644 --- a/ges/ges-track-element.c +++ b/ges/ges-track-element.c @@ -815,6 +815,8 @@ ges_track_element_set_track (GESTrackElement * object, GESTrack * track) object->priv->track = track; if (object->priv->track) { + ges_track_element_set_track_type (object, track->type); + g_object_set (object->priv->nleobject, "caps", ges_track_get_caps (object->priv->track), NULL); }