Fix T76774: Crash on prefetching sequences from another scene.
When rendering another scene, caching in disabled by setting local_context.skip_cache = true. Precondition checking for this flag was missing in BKE_sequencer_cache_get and it wasn't first thing to check in BKE_sequencer_cache_put. Reviewed By: brecht Differential Revision: https://developer.blender.org/D7750
This commit is contained in:
@@ -1217,6 +1217,11 @@ void BKE_sequencer_cache_cleanup_sequence(Scene *scene,
|
||||
struct ImBuf *BKE_sequencer_cache_get(
|
||||
const SeqRenderData *context, Sequence *seq, float cfra, int type, bool skip_disk_cache)
|
||||
{
|
||||
|
||||
if (context->skip_cache || context->is_proxy_render || !seq) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Scene *scene = context->scene;
|
||||
|
||||
if (context->is_prefetch_render) {
|
||||
@@ -1314,6 +1319,10 @@ void BKE_sequencer_cache_put(const SeqRenderData *context,
|
||||
float cost,
|
||||
bool skip_disk_cache)
|
||||
{
|
||||
if (i == NULL || context->skip_cache || context->is_proxy_render || !seq) {
|
||||
return;
|
||||
}
|
||||
|
||||
Scene *scene = context->scene;
|
||||
|
||||
if (context->is_prefetch_render) {
|
||||
@@ -1322,10 +1331,6 @@ void BKE_sequencer_cache_put(const SeqRenderData *context,
|
||||
seq = BKE_sequencer_prefetch_get_original_sequence(seq, scene);
|
||||
}
|
||||
|
||||
if (i == NULL || context->skip_cache || context->is_proxy_render || !seq) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Prevent reinserting, it breaks cache key linking. */
|
||||
ImBuf *test = BKE_sequencer_cache_get(context, seq, cfra, type, true);
|
||||
if (test) {
|
||||
|
||||
Reference in New Issue
Block a user