diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-09-15 13:12:19 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-09-22 12:07:35 +0300 |
commit | 8909ff0e6701ce31ed1431e96cf18f6966113241 (patch) | |
tree | b9a0d1e76cefbb916fe8fea7937b5c6fa178ab10 /source | |
parent | 7b748e9478f4e88a6e94687b8202261957674424 (diff) |
Fix filebrowser not getting back to valid dir in Release builds.
Stupid mistake wrapping path validation code inside a BLI_assert, which means it was
only called in Debug builds...
Found by Sergey, thanks.
Should be backported to 2.78.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 14719322bf7..ab95a774dc8 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -1405,7 +1405,9 @@ void filelist_setdir(struct FileList *filelist, char *r_dir) BLI_assert(strlen(r_dir) < FILE_MAX_LIBEXTRA); BLI_cleanup_dir(G.main->name, r_dir); - BLI_assert(filelist->checkdirf(filelist, r_dir, true)); + const bool is_valid_path = filelist->checkdirf(filelist, r_dir, true); + BLI_assert(is_valid_path); + UNUSED_VARS_NDEBUG(is_valid_path); if (!STREQ(filelist->filelist.root, r_dir)) { BLI_strncpy(filelist->filelist.root, r_dir, sizeof(filelist->filelist.root)); |