diff options
-rw-r--r-- | source/blender/editors/render/render_preview.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index daff5eee4c0..3423eedf7ca 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -1146,15 +1146,6 @@ static void icon_preview_endjob(void *customdata) #endif } - if (ip->id_copy) { - /* Feels a bit hacky just to reuse shader_preview_free() */ - ShaderPreview *sp = MEM_callocN(sizeof(ShaderPreview), "Icon ShaderPreview"); - sp->id_copy = ip->id_copy; - sp->own_id_copy = true; - shader_preview_free(sp); - ip->id_copy = NULL; - } - if (ip->owner) { PreviewImage *prv_img = ip->owner; prv_img->tag &= ~PRV_TAG_DEFFERED_RENDERING; @@ -1169,6 +1160,15 @@ static void icon_preview_free(void *customdata) { IconPreview *ip = (IconPreview *)customdata; + if (ip->id_copy) { + /* Feels a bit hacky just to reuse shader_preview_free() */ + ShaderPreview *sp = MEM_callocN(sizeof(ShaderPreview), "Icon ShaderPreview"); + sp->id_copy = ip->id_copy; + sp->own_id_copy = true; + shader_preview_free(sp); + ip->id_copy = NULL; + } + BLI_freelistN(&ip->sizes); MEM_freeN(ip); } |