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:
authorCampbell Barton <ideasman42@gmail.com>2011-11-30 04:32:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-30 04:32:13 +0400
commit9b2df014d2ab714c4ff0ec9848f25a7db7f54142 (patch)
treea571e2a262f8d5ccbeb8b94fcc3d320c9dadb378 /source/blender/blenkernel/intern/image.c
parentaff705c4305cf972992fd4750dccc8b7b4a343b8 (diff)
fix [#29459] Crash making a linked object group local
was an error with make-local refactor & path updating.
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r--source/blender/blenkernel/intern/image.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index c7f74f37a2d..fb734ea4f3d 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -385,19 +385,19 @@ void make_local_image(struct Image *ima)
extern_local_image(ima);
}
else if(is_local && is_lib) {
- Image *iman= copy_image(ima);
+ Image *ima_new= copy_image(ima);
- iman->id.us= 0;
+ ima_new->id.us= 0;
/* Remap paths of new ID using old library as base. */
- BKE_id_lib_local_paths(bmain, &iman->id);
+ BKE_id_lib_local_paths(bmain, ima->id.lib, &ima_new->id);
tex= bmain->tex.first;
while(tex) {
if(tex->id.lib==NULL) {
if(tex->ima==ima) {
- tex->ima = iman;
- iman->id.us++;
+ tex->ima = ima_new;
+ ima_new->id.us++;
ima->id.us--;
}
}
@@ -407,8 +407,8 @@ void make_local_image(struct Image *ima)
while(brush) {
if(brush->id.lib==NULL) {
if(brush->clone.image==ima) {
- brush->clone.image = iman;
- iman->id.us++;
+ brush->clone.image = ima_new;
+ ima_new->id.us++;
ima->id.us--;
}
}
@@ -429,11 +429,11 @@ void make_local_image(struct Image *ima)
for(a=0; a<me->totface; a++, tface++) {
if(tface->tpage == ima) {
- tface->tpage = iman;
- if(iman->id.us == 0) {
+ tface->tpage = ima_new;
+ if(ima_new->id.us == 0) {
tface->tpage->id.us= 1;
}
- id_lib_extern((ID*)iman);
+ id_lib_extern((ID*)ima_new);
}
}
}