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:
Diffstat (limited to 'source/blender/src/interface_icons.c')
-rw-r--r--source/blender/src/interface_icons.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/src/interface_icons.c b/source/blender/src/interface_icons.c
index 3fb6caf15b5..568907c77e7 100644
--- a/source/blender/src/interface_icons.c
+++ b/source/blender/src/interface_icons.c
@@ -699,10 +699,12 @@ static void icon_from_image(Image *img, RenderInfo *ri)
/* new rule: never read images, so icons get created while user works,
not always on first use of a menu */
if(!img->preview) {
- if(img->ibuf==NULL || img->ibuf->rect==NULL) {
+ ImBuf *ibuf;
+ if(img->ok!=IMA_OK_LOADED) {
return;
}
- icon_copy_rect(img->ibuf, ri);
+ ibuf= BKE_image_get_ibuf(img, NULL);
+ icon_copy_rect(ibuf, ri);
/* now copy the created preview to the DNA struct to be saved in file */
img->preview = MEM_callocN(sizeof(PreviewImage), "img_prv");