diff options
author | Julian Eisel <julian@blender.org> | 2020-12-16 18:07:23 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-12-16 18:38:56 +0300 |
commit | 7ed69bd672555f6bbedc598aacda56efb6eeafbb (patch) | |
tree | 00bf0348d63d9f7d43377ea68e2bb1f84e1ac156 /source/blender/editors/space_file | |
parent | 4463087223983c40a6d67beab0513fba7cdb7538 (diff) |
Fix T83843: Crash in Asset Browser sidebar with geometry asset selected
No icon should be created if the preview doesn't exist.
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 3ed7b5499db..8202a87864d 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -1511,7 +1511,9 @@ static void filelist_cache_preview_runf(TaskPool *__restrict pool, void *taskdat * in case user switch to a bigger preview size. */ ImBuf *imbuf = IMB_thumb_manage(preview->path, THB_LARGE, source); IMB_thumb_path_unlock(preview->path); - preview->icon_id = BKE_icon_imbuf_create(imbuf); + if (imbuf) { + preview->icon_id = BKE_icon_imbuf_create(imbuf); + } done = true; } |