Fix T99091: Freeze when changing strip source with thumbnails enabled

When input file is changed, `orig_height` and `orig_width` fields are
reset, which causes thumbnail dimensions to be incorrectly calculated.

Only draw thumbnails if both mentioned fields are non 0.
This commit is contained in:
Richard Antalik 2022-06-23 17:49:26 +02:00
parent 1c83354c63
commit d1ea39aac7
Notes: blender-bot 2023-02-13 15:16:30 +01:00
Referenced by issue #99091, Regression: VSE freeze when changing the source of an image with thumbnails enabled
Referenced by issue #98661, 3.2: Potential candidates for corrective releases
1 changed files with 5 additions and 0 deletions

View File

@ -427,6 +427,11 @@ void draw_seq_strip_thumbnail(View2D *v2d,
float image_height, image_width, thumb_width;
rcti crop;
StripElem *se = seq->strip->stripdata;
if (se->orig_height == 0 || se->orig_width == 0) {
return;
}
/* If width of the strip too small ignore drawing thumbnails. */
if ((y2 - y1) / pixely <= 20 * U.dpi_fac) {
return;