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:
authorJulian Eisel <julian@blender.org>2021-11-30 16:35:02 +0300
committerJulian Eisel <julian@blender.org>2021-11-30 16:35:29 +0300
commit8cf0d15b6021280b70b8cc51016e9754f67dd13e (patch)
treeda2a896ae8b1e3da05c0a4e1108bbfbe8fa21485 /source/blender/editors
parent1cd9fcd98d5f1f11d2c20a35ae19142e5458068c (diff)
Fix T93508: Shift+F1 to switch to asset browser randomly crashes
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_file/file_ops.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 15bb7917924..34fad2bcbdb 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -1413,8 +1413,13 @@ int file_highlight_set(SpaceFile *sfile, ARegion *region, int mx, int my)
return 0;
}
- numfiles = filelist_files_ensure(sfile->files);
params = ED_fileselect_get_active_params(sfile);
+ /* In case #SpaceFile.browse_mode just changed, the area may be pending a refresh still, which is
+ * what creates the params for the current browse mode. See T93508. */
+ if (!params) {
+ return false;
+ }
+ numfiles = filelist_files_ensure(sfile->files);
origfile = params->highlight_file;