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
path: root/source
diff options
context:
space:
mode:
authorKen Hughes <khughes@pacific.edu>2006-03-11 04:14:33 +0300
committerKen Hughes <khughes@pacific.edu>2006-03-11 04:14:33 +0300
commit93c3a6f7847c2923b149f76e29546791fa989640 (patch)
tree7020493b8e430900135b24bed046afc89ab1f10a /source
parent9f73fe008cb3c5e1b852526e152c5ad3389817be (diff)
Bugfix #3898: Scene.unlink() was not decrementing the datablock user count.
Diffstat (limited to 'source')
-rw-r--r--source/blender/python/api2_2x/Scene.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/Scene.c b/source/blender/python/api2_2x/Scene.c
index 4f986e51555..80d49d479bd 100644
--- a/source/blender/python/api2_2x/Scene.c
+++ b/source/blender/python/api2_2x/Scene.c
@@ -818,9 +818,10 @@ static PyObject *Scene_unlink( BPy_Scene * self, PyObject * args )
/* is the object really in the scene? */
base = EXPP_Scene_getObjectBase( scene, object );
- if( base ) { /* if it is, remove it: */
+ if( base ) { /* if it is, remove it */
+ ((ID *)object->data)->us--;
BLI_remlink( &scene->base, base );
- object->id.us -= 1;
+ object->id.us--;
MEM_freeN( base );
scene->basact = 0; /* in case the object was selected */
retval = 1;