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>2020-12-16 18:07:23 +0300
committerJulian Eisel <julian@blender.org>2020-12-16 18:38:56 +0300
commit7ed69bd672555f6bbedc598aacda56efb6eeafbb (patch)
tree00bf0348d63d9f7d43377ea68e2bb1f84e1ac156
parent4463087223983c40a6d67beab0513fba7cdb7538 (diff)
Fix T83843: Crash in Asset Browser sidebar with geometry asset selected
No icon should be created if the preview doesn't exist.
-rw-r--r--source/blender/editors/space_file/filelist.c4
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;
}