diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-05-31 14:17:29 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-05-31 14:17:29 +0400 |
commit | cc390206fc6e3cf5d577f01b186eecbf1664e16b (patch) | |
tree | c6af17d1d317aec7b89f684e09f10e76ae61bc02 /source | |
parent | 7b5318ef46282240c8be46f3c98aec406392496b (diff) |
Fix #35581: Crash when using Track Refine
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/tracking.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index b934640e5a0..d556c75259b 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -2455,6 +2455,10 @@ static ImBuf *tracking_context_get_keyframed_ibuf(MovieClip *clip, MovieClipUser int keyed_framenr; marker_keyed = tracking_context_get_keyframed_marker(track, curfra, backwards); + if (marker_keyed == NULL) { + return NULL; + } + keyed_framenr = marker_keyed->framenr; *marker_keyed_r = marker_keyed; @@ -2816,8 +2820,14 @@ void BKE_tracking_refine_marker(MovieClip *clip, MovieTrackingTrack *track, Movi reference_framenr = backwards ? marker->framenr + 1 : marker->framenr - 1; reference_ibuf = tracking_context_get_reference_ibuf(clip, &user, clip_flag, track, reference_framenr, backwards, &reference_marker); - if (reference_ibuf == NULL) + if (reference_ibuf == NULL) { return; + } + + /* Could not refine with self. */ + if (reference_marker == marker) { + return; + } /* Destination image buffer has got frame number corresponding to refining marker. */ destination_ibuf = BKE_movieclip_get_ibuf_flag(clip, &user, clip_flag, MOVIECLIP_CACHE_SKIP); |