Fix T81250: Crash after undoing with prefetching
Main DB and it's structs can point to different address after undoing. In this case problem was that bmain was not updated. Same fix was done for scene as well. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9240
This commit is contained in:
@@ -319,6 +319,7 @@ static void seq_prefetch_update_scene(Scene *scene)
|
||||
return;
|
||||
}
|
||||
|
||||
pfjob->scene = scene;
|
||||
seq_prefetch_free_depsgraph(pfjob);
|
||||
seq_prefetch_init_depsgraph(pfjob);
|
||||
}
|
||||
@@ -499,15 +500,14 @@ static PrefetchJob *seq_prefetch_start(const SeqRenderData *context, float cfra)
|
||||
BLI_mutex_init(&pfjob->prefetch_suspend_mutex);
|
||||
BLI_condition_init(&pfjob->prefetch_suspend_cond);
|
||||
|
||||
pfjob->bmain = context->bmain;
|
||||
pfjob->bmain_eval = BKE_main_new();
|
||||
|
||||
pfjob->scene = context->scene;
|
||||
seq_prefetch_init_depsgraph(pfjob);
|
||||
}
|
||||
}
|
||||
seq_prefetch_update_scene(context->scene);
|
||||
seq_prefetch_update_context(context);
|
||||
pfjob->bmain = context->bmain;
|
||||
|
||||
pfjob->cfra = cfra;
|
||||
pfjob->num_frames_prefetched = 1;
|
||||
|
Reference in New Issue
Block a user