diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-19 17:27:40 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-19 17:27:40 +0300 |
commit | b9e4e69a4d38372e62b52fa826274673b7dfaacf (patch) | |
tree | 2ca9848831f94326e6f651d2e84b012d990013fb /source/blender/blenkernel/intern/world.c | |
parent | eeedcf38929b6c0897b91df26e2ba66e1e74d626 (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/world.c')
-rw-r--r-- | source/blender/blenkernel/intern/world.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c index 277aeaa7e42..f926e29ea84 100644 --- a/source/blender/blenkernel/intern/world.c +++ b/source/blender/blenkernel/intern/world.c @@ -138,7 +138,7 @@ World *BKE_world_copy(Main *bmain, World *wrld) wrldn->nodetree = ntreeCopyTree(bmain, wrld->nodetree); } - wrldn->preview = BKE_previewimg_copy(wrld->preview); + BKE_previewimg_id_copy(&wrldn->id, &wrld->id); BLI_listbase_clear(&wrldn->gpumaterial); |