Fix T39546: blender crash on open recent file, when tracking is still in progress

This commit is contained in:
Sergey Sharybin 2014-04-01 18:43:49 +06:00
parent fb25a86f43
commit e21a7b32f9
Notes: blender-bot 2023-02-14 10:52:05 +01:00
Referenced by issue #39546, blender crash on open recent file, when tracking is still in progress
1 changed files with 4 additions and 1 deletions

View File

@ -1307,10 +1307,13 @@ static void track_markers_updatejob(void *tmv)
static void track_markers_endjob(void *tmv)
{
TrackMarkersJob *tmj = (TrackMarkersJob *)tmv;
wmWindowManager *wm = tmj->main->wm.first;
tmj->clip->tracking_context = NULL;
tmj->scene->r.cfra = BKE_movieclip_remap_clip_to_scene_frame(tmj->clip, tmj->lastfra);
ED_update_for_newframe(tmj->main, tmj->scene, 0);
if (wm != NULL) {
ED_update_for_newframe(tmj->main, tmj->scene, 0);
}
BKE_tracking_context_sync(tmj->context);
BKE_tracking_context_finish(tmj->context);