diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-03-09 20:12:21 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-03-09 20:12:38 +0300 |
commit | 01b2071c14d1be96b965e39138e008ae6cfb1d40 (patch) | |
tree | aa8c33722bdebd9bbfe06684ece68fe9b3b786bd /source/blender/editors/space_text/text_draw.c | |
parent | 51737a2c8c7f6cdb305591c2a71fd93a8ac05b89 (diff) |
Immediate Mode: Fix crash on text editor when going over suggestion list
Diffstat (limited to 'source/blender/editors/space_text/text_draw.c')
-rw-r--r-- | source/blender/editors/space_text/text_draw.c | 3 |
1 files changed, 2 insertions, 1 deletions
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(); } |