From 03a83b4eb5bc87dd30625d35022b6bc5e4edd8fd Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 18 Jun 2021 15:45:58 +0200 Subject: Fix T89262: Crash in regular FileBrowser ID listing of 'asset' .blend files. `ED_fileselect_get_asset_params` would only return actual data pointer when file browser is in ASSET mode. Calling that whole section only makes sense if filebrowser is in asset mode anyway. Regression introduced in rBf6c5af3d4753 I think. @Severin committing this fix now as this is a fairly critical bug for the studio, feel free to revert and do proper fix if this one is not the best solution. --- source/blender/editors/space_file/file_draw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender') diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 17d029f7541..5e09692b041 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -174,7 +174,8 @@ static void file_draw_icon(const SpaceFile *sfile, if ((id = filelist_file_get_id(file))) { UI_but_drag_set_id(but, id); } - else if (file->typeflag & FILE_TYPE_ASSET) { + else if (sfile->browse_mode == FILE_BROWSE_MODE_ASSETS && + (file->typeflag & FILE_TYPE_ASSET) != 0) { ImBuf *preview_image = filelist_file_getimage(file); char blend_path[FILE_MAX_LIBEXTRA]; if (BLO_library_path_explode(path, blend_path, NULL, NULL)) { -- cgit v1.2.3