diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-12-04 14:57:36 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-12-04 14:57:36 +0400 |
commit | bd9583a1d44793bf82f517e1aa55c2f46af7b49e (patch) | |
tree | 871a93c71e94332f84e1f0b7df6c21f4c87dd07c /source/blender/editors/space_clip/tracking_ops.c | |
parent | 12326ac6c554d97fbd38cf954ee7805e3205faad (diff) |
Fix crash when trying to track disabled track.
This is possible fixes #29498: Seg fault on trying to track byond clip length
Diffstat (limited to 'source/blender/editors/space_clip/tracking_ops.c')
-rw-r--r-- | source/blender/editors/space_clip/tracking_ops.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index 89c58ab5d81..3d004ab73da 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -1209,11 +1209,16 @@ static int track_count_markers(SpaceClip *sc, MovieClip *clip) { int tot= 0; MovieTrackingTrack *track; + int framenr= sc->user.framenr; track= clip->tracking.tracks.first; while(track) { - if(TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_LOCKED)==0) - tot++; + if(TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_LOCKED)==0) { + MovieTrackingMarker *marker= BKE_tracking_exact_marker(track, framenr); + + if (!marker || (marker->flag&MARKER_DISABLED) == 0) + tot++; + } track= track->next; } |