[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34410] trunk/blender/source/blender/ blenkernel/intern/nla.c: NLA backend code cleanups: Ensure all user-count management is done
Joshua Leung
aligorith at gmail.com
Thu Jan 20 00:05:03 CET 2011
Revision: 34410
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34410
Author: aligorith
Date: 2011-01-19 23:05:02 +0000 (Wed, 19 Jan 2011)
Log Message:
-----------
NLA backend code cleanups: Ensure all user-count management is done
via id_us_*() functions instead of direct access, for more security
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/nla.c
Modified: trunk/blender/source/blender/blenkernel/intern/nla.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/nla.c 2011-01-19 22:49:09 UTC (rev 34409)
+++ trunk/blender/source/blender/blenkernel/intern/nla.c 2011-01-19 23:05:02 UTC (rev 34410)
@@ -78,7 +78,7 @@
/* remove reference to action */
if (strip->act)
- strip->act->id.us--;
+ id_us_min(&strip->act->id);
/* free remapping info */
//if (strip->remap)
@@ -160,7 +160,7 @@
/* increase user-count of action */
if (strip_d->act)
- strip_d->act->id.us++;
+ id_us_plus(&strip_d->act->id);
/* copy F-Curves and modifiers */
copy_fcurves(&strip_d->fcurves, &strip->fcurves);
@@ -1438,7 +1438,7 @@
/* do other necessary work on strip */
if (strip) {
/* clear reference to action now that we've pushed it onto the stack */
- adt->action->id.us--;
+ id_us_min(&adt->action->id);
adt->action= NULL;
/* if the strip is the first one in the track it lives in, check if there
More information about the Bf-blender-cvs
mailing list