Fix T93508: Shift+F1 to switch to asset browser randomly crashes

This commit is contained in:
Julian Eisel 2021-11-30 14:35:02 +01:00 committed by Philipp Oeser
parent 77694b571f
commit 256a2d1e98
Notes: blender-bot 2023-02-14 04:20:36 +01:00
Referenced by issue #93508, Shift+F1 to switch to asset browser randomly crashes
Referenced by issue #93479, 3.0 Potential candidates for corrective releases
1 changed files with 6 additions and 1 deletions

View File

@ -1418,8 +1418,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;