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-06-29 21:02:01 +0300
committerJulian Eisel <julian@blender.org>2021-06-29 21:09:07 +0300
commitea43ae4194e293599997f1d0d47430b462b4fd7f (patch)
tree12586041be73c239482b5be01649af1c940b590b /source/blender/editors/space_file
parent516a060bb38d119a397848d30f6e5923d95f135f (diff)
Fix crash on link/append for asset data-blocks in Thumbnails mode
Same fix as 03a83b4eb5bc, but for the Thumbnails display mode.
Diffstat (limited to 'source/blender/editors/space_file')
-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 6e409d2f5a4..46d37d21756 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -489,7 +489,8 @@ static void file_draw_preview(const SpaceFile *sfile,
UI_but_drag_set_id(but, id);
}
/* path is no more static, cannot give it directly to but... */
- else if (file->typeflag & FILE_TYPE_ASSET) {
+ else if (sfile->browse_mode == FILE_BROWSE_MODE_ASSETS &&
+ (file->typeflag & FILE_TYPE_ASSET) != 0) {
char blend_path[FILE_MAX_LIBEXTRA];
if (BLO_library_path_explode(path, blend_path, NULL, NULL)) {