From 32481a5732f2ce785c7a8b27145683391513c003 Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Thu, 23 Jun 2022 17:49:26 +0200 Subject: 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. --- source/blender/editors/space_sequencer/sequencer_thumbnails.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/blender/editors/space_sequencer/sequencer_thumbnails.c b/source/blender/editors/space_sequencer/sequencer_thumbnails.c index 43c5e004040..2b7b6a4e1a1 100644 --- a/source/blender/editors/space_sequencer/sequencer_thumbnails.c +++ b/source/blender/editors/space_sequencer/sequencer_thumbnails.c @@ -425,6 +425,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; -- cgit v1.2.3