[Bf-blender-cvs] [8909ff0] blender-v2.78-release: Fix filebrowser not getting back to valid dir in Release builds.
Bastien Montagne
noreply at git.blender.org
Thu Sep 22 11:15:18 CEST 2016
Commit: 8909ff0e6701ce31ed1431e96cf18f6966113241
Author: Bastien Montagne
Date: Thu Sep 15 12:12:19 2016 +0200
Branches: blender-v2.78-release
https://developer.blender.org/rB8909ff0e6701ce31ed1431e96cf18f6966113241
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.
===================================================================
M source/blender/editors/space_file/filelist.c
===================================================================
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 1471932..ab95a77 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));
More information about the Bf-blender-cvs
mailing list