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
parent 1cd9fcd98d
commit 8cf0d15b60

View File

@@ -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;