diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-11-08 18:03:16 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-11-08 18:03:16 +0400 |
commit | 62988d6311ec73e6660d2e893652cb69c9db7e45 (patch) | |
tree | cafbbfc3f641b8bf21f262953395f696f275816f | |
parent | 28ee0f92184af8ba6f44d08eda23ce5eb3815697 (diff) |
Attempt to fix #29200: Camera Tracking Solver
It was an mistake in join tracks operator which lead to reading unitialized memory.
-rw-r--r-- | source/blender/blenkernel/intern/tracking.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index a834628641a..d9217d2be09 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -446,13 +446,13 @@ int BKE_tracking_test_join_tracks(MovieTrackingTrack *dst_track, MovieTrackingTr int i, a= 0, b= 0, tot= dst_track->markersnr+src_track->markersnr; int count= 0; - for(i= 0; i<tot; i++) { - if(a>=src_track->markersnr) { - b++; + while(a<src_track->markersnr || b<dst_track->markersnr) { + if(b>=dst_track->markersnr) { + a++; count++; } - else if(b>=dst_track->markersnr) { - a++; + else if(a>=src_track->markersnr) { + b++; count++; } else if(src_track->markers[a].framenr<dst_track->markers[b].framenr) { |