[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14119] trunk/blender/source/blender/ python/BPY_interface.c: fix bug in walking through script linked list ( thanks VS)

Benoit Bolsee benoit.bolsee at online.be
Sat Mar 15 17:49:22 CET 2008


Revision: 14119
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14119
Author:   ben2610
Date:     2008-03-15 17:49:22 +0100 (Sat, 15 Mar 2008)

Log Message:
-----------
fix bug in walking through script linked list (thanks VS)

Modified Paths:
--------------
    trunk/blender/source/blender/python/BPY_interface.c

Modified: trunk/blender/source/blender/python/BPY_interface.c
===================================================================
--- trunk/blender/source/blender/python/BPY_interface.c	2008-03-15 16:45:49 UTC (rev 14118)
+++ trunk/blender/source/blender/python/BPY_interface.c	2008-03-15 16:49:22 UTC (rev 14119)
@@ -261,6 +261,7 @@
 void BPY_end_python( void )
 {
 	Script *script = NULL;
+	Script *next_script = NULL;
 
 	PyGILState_Ensure(); /* finalizing, no need to grab the state */
 
@@ -281,7 +282,8 @@
 
 	/* Freeing all scripts here prevents problems with the order in which
 	 * Python is finalized and G.main is freed in exit_usiblender() */
-	for (script = G.main->script.first; script; script = script->id.next) {
+	for (script = G.main->script.first; script; script = next_script) {
+		next_script = script->id.next;
 		BPY_clear_script(script);
 		free_libblock( &G.main->script, script );
 	}





More information about the Bf-blender-cvs mailing list