[Bf-blender-cvs] [7ed69bd6725] master: Fix T83843: Crash in Asset Browser sidebar with geometry asset selected
Julian Eisel
noreply at git.blender.org
Wed Dec 16 16:39:01 CET 2020
Commit: 7ed69bd672555f6bbedc598aacda56efb6eeafbb
Author: Julian Eisel
Date: Wed Dec 16 16:07:23 2020 +0100
Branches: master
https://developer.blender.org/rB7ed69bd672555f6bbedc598aacda56efb6eeafbb
Fix T83843: Crash in Asset Browser sidebar with geometry asset selected
No icon should be created if the preview doesn't exist.
===================================================================
M source/blender/editors/space_file/filelist.c
===================================================================
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;
}
More information about the Bf-blender-cvs
mailing list