diff options
author | Richard Antalik <richardantalik@gmail.com> | 2019-05-13 01:21:38 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2019-05-13 01:25:30 +0300 |
commit | 05f1451d724874e12b3f1373e83849dbb4960ef6 (patch) | |
tree | 5a8cbd3dcdbee3ae7382716157ccf47b7de32b67 /source/blender/editors/space_sequencer/sequencer_draw.c | |
parent | eff273c0bc31fa321c35e132949eb8a6062952dc (diff) |
Fix T64371
Variable stripe_offs used without been initialized
Reviewed by: brecht
Differential Revision: https://developer.blender.org/D4845
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_draw.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_draw.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 7caad1d057e..60bc320c026 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -1922,10 +1922,14 @@ static void draw_cache_view(const bContext *C) uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); - float stripe_bot, stripe_top, stripe_offs; + float stripe_bot, stripe_top; + float stripe_offs = UI_view2d_region_to_view_y(v2d, 1.0f) - v2d->cur.ymin; float stripe_ht = UI_view2d_region_to_view_y(v2d, 4.0f * UI_DPI_FAC * U.pixelsize) - v2d->cur.ymin; + CLAMP_MAX(stripe_ht, 0.2f); + CLAMP_MIN(stripe_offs, stripe_ht / 2); + if (scene->ed->cache_flag & SEQ_CACHE_VIEW_FINAL_OUT) { stripe_bot = UI_view2d_region_to_view_y(v2d, V2D_SCROLL_HEIGHT_HANDLES); stripe_top = stripe_bot + stripe_ht; @@ -1944,10 +1948,6 @@ static void draw_cache_view(const bContext *C) continue; } - CLAMP_MAX(stripe_ht, 0.2f); - stripe_offs = UI_view2d_region_to_view_y(v2d, 1.0f) - v2d->cur.ymin; - CLAMP_MIN(stripe_offs, stripe_ht / 2); - stripe_bot = seq->machine + SEQ_STRIP_OFSBOTTOM + stripe_offs; stripe_top = stripe_bot + stripe_ht; |