Fix crash on link/append for asset data-blocks in Thumbnails mode

Same fix as 03a83b4eb5, but for the Thumbnails display mode.
This commit is contained in:
Julian Eisel 2021-06-29 20:02:01 +02:00
parent 516a060bb3
commit ea43ae4194
Notes: blender-bot 2023-02-14 05:52:32 +01:00
Referenced by issue #90642, Some UI element are missing in UV editor
1 changed files with 2 additions and 1 deletions

View File

@ -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)) {