diff options
-rw-r--r-- | source/blender/editors/space_file/file_draw.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 3553a0ed79a..2bd92b1e207 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -295,11 +295,18 @@ static void file_draw_icon(uiBlock *block, char *path, int sx, int sy, int icon, static void file_draw_string(int sx, int sy, const char *string, float width, int height, short align) { - uiStyle *style = UI_style_get(); - uiFontStyle fs = style->widgetlabel; + uiStyle *style; + uiFontStyle fs; rcti rect; char fname[FILE_MAXFILE]; + if (string[0] == '\0') { + return; + } + + style = UI_style_get(); + fs = style->widgetlabel; + fs.align = align; BLI_strncpy(fname, string, FILE_MAXFILE); |