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
diff options
context:
space:
mode:
authorBenoit Bolsee <benoit.bolsee@online.be>2008-03-15 19:49:22 +0300
committerBenoit Bolsee <benoit.bolsee@online.be>2008-03-15 19:49:22 +0300
commitf70d9ceed0866ccccb13f7c23c1b32123b387589 (patch)
tree84b2cfe38e4fbf10f021e8b6d876dd6c15160be1 /source/blender/python
parent2004e08964685279b4e2bb3750ca54b6b1c00c61 (diff)
fix bug in walking through script linked list (thanks VS)
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/BPY_interface.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/python/BPY_interface.c b/source/blender/python/BPY_interface.c
index febf5e3ff31..f99a804d75f 100644
--- a/source/blender/python/BPY_interface.c
+++ b/source/blender/python/BPY_interface.c
@@ -261,6 +261,7 @@ void BPY_start_python( int argc, char **argv )
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 @@ void BPY_end_python( void )
/* 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 );
}