[Bf-blender-cvs] [a1a333a1e92] blender-v2.83-release: Fix T76774: Crash on prefetching sequences from another scene.

Richard Antalik noreply at git.blender.org
Fri May 22 13:35:20 CEST 2020


Commit: a1a333a1e92ea5757b424686c93e53d86a7a8c96
Author: Richard Antalik
Date:   Fri May 22 12:59:26 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rBa1a333a1e92ea5757b424686c93e53d86a7a8c96

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

===================================================================

M	source/blender/blenkernel/intern/seqcache.c

===================================================================

diff --git a/source/blender/blenkernel/intern/seqcache.c b/source/blender/blenkernel/intern/seqcache.c
index a08bbf182fa..5c2d5b0087f 100644
--- a/source/blender/blenkernel/intern/seqcache.c
+++ b/source/blender/blenkernel/intern/seqcache.c
@@ -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) {



More information about the Bf-blender-cvs mailing list