[Bf-blender-cvs] [b0710834966] blender-v3.0-release: Fix T93166: Division by zero when drawing thumbnails

Richard Antalik noreply at git.blender.org
Thu Nov 18 01:12:48 CET 2021


Commit: b071083496638e7e96b787f524a5b9add094010d
Author: Richard Antalik
Date:   Thu Nov 18 01:05:51 2021 +0100
Branches: blender-v3.0-release
https://developer.blender.org/rBb071083496638e7e96b787f524a5b9add094010d

Fix T93166: Division by zero when drawing thumbnails

Caused by incorrect step calculation fo too short strips. For these,
step should be equal to strip length not 0.

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

M	source/blender/sequencer/intern/render.c

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

diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c
index 12d97d7e3e3..8ce3398024d 100644
--- a/source/blender/sequencer/intern/render.c
+++ b/source/blender/sequencer/intern/render.c
@@ -2047,7 +2047,7 @@ int SEQ_render_thumbnails_guaranteed_set_frame_step_get(const Sequence *seq)
   /* Arbitrary, but due to performance reasons should be as low as possible. */
   const int thumbnails_base_set_count = min_ii(content_len / 100, 30);
   if (thumbnails_base_set_count <= 0) {
-    return 0;
+    return content_len;
   }
   return content_len / thumbnails_base_set_count;
 }



More information about the Bf-blender-cvs mailing list