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/curve/editcurve.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/curve/editcurve.c')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index f7dab0c0935..5a47cc148d2 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -49,6 +49,7 @@ #include "BKE_fcurve.h" #include "BKE_global.h" #include "BKE_key.h" +#include "BKE_library.h" #include "BKE_main.h" #include "BKE_report.h" #include "BKE_animsys.h" @@ -1298,7 +1299,7 @@ static int separate_exec(bContext *C, wmOperator *op) newob = newbase->object; newcu = newob->data = BKE_curve_copy(oldcu); newcu->editnurb = NULL; - oldcu->id.us--; /* because new curve is a copy: reduce user count */ + id_us_min(&oldcu->id); /* because new curve is a copy: reduce user count */ /* 3. put new object in editmode, clear it and set separated nurbs */ make_editNurb(newob); |