Commit: 01b2071c14d1be96b965e39138e008ae6cfb1d40
Author: Dalai Felinto
Date:   Thu Mar 9 18:12:21 2017 +0100
Branches: blender2.8
https://developer.blender.org/rB01b2071c14d1be96b965e39138e008ae6cfb1d40

Immediate Mode: Fix crash on text editor when going over suggestion list

===================================================================

M       source/blender/editors/space_text/text_draw.c

===================================================================

diff --git a/source/blender/editors/space_text/text_draw.c 
b/source/blender/editors/space_text/text_draw.c
index 3607bf90543..b6d71b8ccf9 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -1090,10 +1090,11 @@ static void draw_suggestion_list(const SpaceText *st, 
const TextDrawContext *tdc
                w = st->cwidth * text_get_char_pos(st, str, len);
                
                if (item == sel) {
+                       unsigned int posi = add_attrib(immVertexFormat(), 
"pos", COMP_I32, 2, CONVERT_INT_TO_FLOAT);
                        immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
 
                        immUniformThemeColor(TH_SHADE2);
-                       immRecti(pos, x + margin_x, y - 3, x + margin_x + w, y 
+ lheight - 3);
+                       immRecti(posi, x + margin_x, y - 3, x + margin_x + w, y 
+ lheight - 3);
 
                        immUnbindProgram();
                }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to