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:
authorCampbell Barton <ideasman42@gmail.com>2016-03-02 04:53:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-03-02 04:53:55 +0300
commitaefb68c84d574359a20f61868b84b320b4aa0496 (patch)
tree41fbe6ff3222162face50ab6454a525bbccc66a3 /source/blender
parentc32e8fb09f08a5f9f8c8a261d864d32906140e29 (diff)
Fix assert in UI code
Dont attempt to clip empty string
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/interface/interface_widgets.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index f803622ed62..5898f3b7e6b 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -4087,7 +4087,9 @@ void ui_draw_menu_item(uiFontStyle *fstyle, rcti *rect, const char *name, int ic
const float minwidth = (float)(UI_DPI_ICON_SIZE);
BLI_strncpy(drawstr, name, sizeof(drawstr));
- UI_text_clip_middle_ex(fstyle, drawstr, okwidth, minwidth, max_len, '\0');
+ if (drawstr[0]) {
+ UI_text_clip_middle_ex(fstyle, drawstr, okwidth, minwidth, max_len, '\0');
+ }
glColor4ubv((unsigned char *)wt->wcol.text);
UI_fontstyle_draw(fstyle, rect, drawstr);