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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-07-19 17:27:40 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-07-19 17:27:40 +0300
commitb9e4e69a4d38372e62b52fa826274673b7dfaacf (patch)
tree2ca9848831f94326e6f651d2e84b012d990013fb /source/blender/blenkernel/intern/image.c
parenteeedcf38929b6c0897b91df26e2ba66e1e74d626 (diff)
Fix (IRC reported by Sergey) assert regarding icon_id of newly copied datablocks.
BKE_previewimg_copy() would simply copy PreviewImage's icon_id, without bothering about ID one. When we duplicate an ID, we want to reset its icon_id to zero (and regenerate it on-demand), not keep same icon_id as original, so added new BKE_previewimg_id_copy helper to handle that.
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r--source/blender/blenkernel/intern/image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 7cf2b9558cb..0032eb35d3a 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -459,7 +459,7 @@ Image *BKE_image_copy(Main *bmain, Image *ima)
nima->stereo3d_format = MEM_dupallocN(ima->stereo3d_format);
BLI_duplicatelist(&nima->views, &ima->views);
- nima->preview = BKE_previewimg_copy(ima->preview);
+ BKE_previewimg_id_copy(&nima->id, &ima->id);
if (ID_IS_LINKED_DATABLOCK(ima)) {
BKE_id_expand_local(&nima->id);