[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29199] trunk/blender/source/blender/ makesrna/intern/rna_scene.c: [#22498] scene.objects.unlink() frees object

Campbell Barton ideasman42 at gmail.com
Thu Jun 3 23:48:42 CEST 2010


Revision: 29199
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29199
Author:   campbellbarton
Date:     2010-06-03 23:48:42 +0200 (Thu, 03 Jun 2010)

Log Message:
-----------
[#22498] scene.objects.unlink() frees object
fix by Dan Eicher (dna)

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/rna_scene.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_scene.c	2010-06-03 20:27:16 UTC (rev 29198)
+++ trunk/blender/source/blender/makesrna/intern/rna_scene.c	2010-06-03 21:48:42 UTC (rev 29199)
@@ -161,13 +161,13 @@
 
 #include "BLI_threads.h"
 #include "BLI_editVert.h"
+#include "BLI_blenlib.h"
 
 #include "WM_api.h"
 
 #include "ED_info.h"
 #include "ED_node.h"
 #include "ED_view3d.h"
-#include "ED_object.h"
 #include "ED_mesh.h"
 #include "ED_keyframing.h"
 
@@ -220,8 +220,8 @@
 		return;
 	}
 
-	/* as long as ED_base_object_free_and_unlink calls free_libblock_us, we don't have to decrement ob->id.us */
-	ED_base_object_free_and_unlink(scene, base);
+	BLI_remlink(&scene->base, base);
+	ob->id.us--;
 
 	/* needed otherwise the depgraph will contain free'd objects which can crash, see [#20958] */
 	DAG_scene_sort(scene);





More information about the Bf-blender-cvs mailing list