[Bf-blender-cvs] [eb96f0cf06b] master: Add missing bit to own previous commit

Julian Eisel noreply at git.blender.org
Fri Sep 10 15:01:53 CEST 2021


Commit: eb96f0cf06b9b4932979541fe4032328ad23f41f
Author: Julian Eisel
Date:   Fri Sep 10 15:00:09 2021 +0200
Branches: master
https://developer.blender.org/rBeb96f0cf06b9b4932979541fe4032328ad23f41f

Add missing bit to own previous commit

Amendment to 7a5216497cc3.
Removed this before committing, because I thought it wasn't needed. Of
course it was...

===================================================================

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 46978972821..511b5b255e9 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -1955,7 +1955,9 @@ static FileDirEntry *filelist_file_create_entry(FileList *filelist, const int in
   if (entry->local_data.preview_image &&
       BKE_previewimg_is_finished(entry->local_data.preview_image, ICON_SIZE_PREVIEW)) {
     ImBuf *ibuf = BKE_previewimg_to_imbuf(entry->local_data.preview_image, ICON_SIZE_PREVIEW);
-    ret->preview_icon_id = BKE_icon_imbuf_create(ibuf);
+    if (ibuf) {
+      ret->preview_icon_id = BKE_icon_imbuf_create(ibuf);
+    }
   }
   BLI_addtail(&cache->cached_entries, ret);
   return ret;



More information about the Bf-blender-cvs mailing list