diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-11-09 21:47:10 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-11-09 23:00:53 +0300 |
commit | 865796375bcfa6be4288cca4243dddcb4092f70b (patch) | |
tree | 5264d4b9b0f9d392b6e1b942e0f6fd802de1fff4 /source/blender/editors/object/object_edit.c | |
parent | cf959a879eb5ffbdfa573c5f3a00965e69d7a976 (diff) |
Cleanup: avoid incrementing/decrementing id->us outside of BKE_library.
We have callbacks for that, they also do some checks and help ensure things are done
correctly. Only place where this is assumed not true is blenloader (since here we
may affect refcount of library IDs as well...).
Diffstat (limited to 'source/blender/editors/object/object_edit.c')
-rw-r--r-- | source/blender/editors/object/object_edit.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index c87eeaeb4a3..9b7563ae729 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -934,16 +934,20 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event) cu1->wordspace = cu->wordspace; cu1->ulpos = cu->ulpos; cu1->ulheight = cu->ulheight; - if (cu1->vfont) cu1->vfont->id.us--; + if (cu1->vfont) + id_us_min(&cu1->vfont->id); cu1->vfont = cu->vfont; id_us_plus((ID *)cu1->vfont); - if (cu1->vfontb) cu1->vfontb->id.us--; + if (cu1->vfontb) + id_us_min(&cu1->vfontb->id); cu1->vfontb = cu->vfontb; id_us_plus((ID *)cu1->vfontb); - if (cu1->vfonti) cu1->vfonti->id.us--; + if (cu1->vfonti) + id_us_min(&cu1->vfonti->id); cu1->vfonti = cu->vfonti; id_us_plus((ID *)cu1->vfonti); - if (cu1->vfontbi) cu1->vfontbi->id.us--; + if (cu1->vfontbi) + id_us_min(&cu1->vfontbi->id); cu1->vfontbi = cu->vfontbi; id_us_plus((ID *)cu1->vfontbi); |