[Bf-blender-cvs] [01b2071c14d] blender2.8: Immediate Mode: Fix crash on text editor when going over suggestion list
Dalai Felinto
noreply at git.blender.org
Thu Mar 9 18:12:56 CET 2017
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();
}
More information about the Bf-blender-cvs
mailing list