Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Antalik <richardantalik@gmail.com>2022-06-23 18:49:26 +0300
committerRichard Antalik <richardantalik@gmail.com>2022-06-23 18:49:26 +0300
commitd1ea39aac77203a2f7517b3d0d2ec56ee2e30a22 (patch)
tree5838059004d4a02b608f584ab32304f34f26a9ec
parent1c83354c63a334a57118579d653e642524f23fce (diff)
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.
-rw-r--r--source/blender/editors/space_sequencer/sequencer_thumbnails.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_thumbnails.c b/source/blender/editors/space_sequencer/sequencer_thumbnails.c
index 984d3b1f374..5c929e6673a 100644
--- a/source/blender/editors/space_sequencer/sequencer_thumbnails.c
+++ b/source/blender/editors/space_sequencer/sequencer_thumbnails.c
@@ -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;