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.
This commit is contained in:
parent
00a9617f92
commit
b071083496
Notes:
blender-bot
2023-02-13 17:06:10 +01:00
Referenced by issue #93166, division by zero in `sequencer_thumbnails.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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue