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:
authorBastien Montagne <bastien@blender.org>2021-06-18 16:45:58 +0300
committerBastien Montagne <bastien@blender.org>2021-06-18 16:49:50 +0300
commit03a83b4eb5bc87dd30625d35022b6bc5e4edd8fd (patch)
treef9dbf142c28bc1204933c0874c4f098d04360086 /source/blender/editors/space_file/file_draw.c
parentea4309925f1d2d2a224bd1dce12269a58ade9b62 (diff)
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.
Diffstat (limited to 'source/blender/editors/space_file/file_draw.c')
-rw-r--r--source/blender/editors/space_file/file_draw.c3
1 files changed, 2 insertions, 1 deletions
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)) {