diff options
author | Campbell Barton <campbell@blender.org> | 2022-08-22 05:14:09 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-08-22 05:14:09 +0300 |
commit | 212a3a23dfecfd0af2f14632cb713e2195be457a (patch) | |
tree | fcc836f56c0afd2bdb1d599863ad67d7bf7a50e4 /source/blender | |
parent | f3bf497c2c07ad490e8961f81d5f3c86cd90a940 (diff) | |
parent | c9144f0cbb38c83457d9c78953d10bad1db206ac (diff) |
Merge branch 'blender-v3.3-release'
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenfont/intern/blf_font_default.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/blenfont/intern/blf_font_default.c b/source/blender/blenfont/intern/blf_font_default.c index 63957fad003..a88da6099e5 100644 --- a/source/blender/blenfont/intern/blf_font_default.c +++ b/source/blender/blenfont/intern/blf_font_default.c @@ -53,8 +53,15 @@ void BLF_load_font_stack() BLF_load_default(false); BLF_load_mono_default(false); - const char *path = BKE_appdir_folder_id(BLENDER_DATAFILES, BLF_DATAFILES_FONTS_DIR SEP_STR); - if (path && BLI_exists(path)) { + const char *datafiles_fonts_dir = BLF_DATAFILES_FONTS_DIR SEP_STR; + const char *path = BKE_appdir_folder_id(BLENDER_DATAFILES, datafiles_fonts_dir); + if (UNLIKELY(!path)) { + fprintf(stderr, "Font data directory \"%s\" could not be detected!\n", datafiles_fonts_dir); + } + else if (UNLIKELY(!BLI_exists(path))) { + fprintf(stderr, "Font data directory \"%s\" does not exist!\n", path); + } + else { struct direntry *dir; uint num_files = BLI_filelist_dir_contents(path, &dir); for (int f = 0; f < num_files; f++) { @@ -72,7 +79,4 @@ void BLF_load_font_stack() } BLI_filelist_free(dir, num_files); } - else { - fprintf(stderr, "Fonts not found at %s\n", path); - } } |