diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_bad_level_calls.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/bad_level_call_stubs/stubs.c | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/screen.c | 1 | ||||
-rw-r--r-- | source/blender/python/BPY_interface.c | 18 | ||||
-rw-r--r-- | source/blender/src/editscreen.c | 6 |
5 files changed, 10 insertions, 17 deletions
diff --git a/source/blender/blenkernel/BKE_bad_level_calls.h b/source/blender/blenkernel/BKE_bad_level_calls.h index a5ad16e752e..91268ffe243 100644 --- a/source/blender/blenkernel/BKE_bad_level_calls.h +++ b/source/blender/blenkernel/BKE_bad_level_calls.h @@ -66,7 +66,6 @@ struct Object; void BPY_do_pyscript (struct ID *id, short int event); void BPY_clear_script (struct Script *script); void BPY_free_compiled_text (struct Text *text); -void BPY_free_screen_spacehandlers (struct bScreen *sc); /* pydrivers */ struct Object **BPY_pydriver_get_objects(struct IpoDriver *driver); float BPY_pydriver_eval(struct IpoDriver *driver); diff --git a/source/blender/blenkernel/bad_level_call_stubs/stubs.c b/source/blender/blenkernel/bad_level_call_stubs/stubs.c index 173a130a25e..18b59a75133 100644 --- a/source/blender/blenkernel/bad_level_call_stubs/stubs.c +++ b/source/blender/blenkernel/bad_level_call_stubs/stubs.c @@ -109,7 +109,6 @@ void mainqenter (unsigned short event, short val){} void BPY_do_pyscript(ID *id, short int event){} void BPY_clear_script(Script *script){} void BPY_free_compiled_text(struct Text *text){} -void BPY_free_screen_spacehandlers (struct bScreen *sc){} void BPY_pydriver_update(void){} float BPY_pydriver_eval(struct IpoDriver *driver) { diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index 59bfa17472e..5e8735147c3 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -51,7 +51,6 @@ void free_screen(bScreen *sc) { unlink_screen(sc); - BPY_free_screen_spacehandlers(sc); BLI_freelistN(&sc->vertbase); BLI_freelistN(&sc->edgebase); BLI_freelistN(&sc->areabase); diff --git a/source/blender/python/BPY_interface.c b/source/blender/python/BPY_interface.c index fcf00a895e2..755842a9754 100644 --- a/source/blender/python/BPY_interface.c +++ b/source/blender/python/BPY_interface.c @@ -116,8 +116,6 @@ PyObject *blender_import( PyObject * self, PyObject * args ); void BPY_Err_Handle( char *script_name ); PyObject *traceback_getFilename( PyObject * tb ); -void BPY_free_screen_spacehandlers(struct bScreen *sc); - /**************************************************************************** * Description: This function will start the interpreter and load all modules * as well as search for a python installation. @@ -1648,23 +1646,19 @@ int BPY_do_spacehandlers( ScrArea *sa, unsigned short event, void BPY_free_scriptlink( struct ScriptLink *slink ) { if( slink->totscript ) { - if( slink->flag ) + if( slink->flag ) { MEM_freeN( slink->flag ); - if( slink->scripts ) + slink->flag= NULL; + } + if( slink->scripts ) { MEM_freeN( slink->scripts ); + slink->scripts= NULL; + } } return; } -void BPY_free_screen_spacehandlers(struct bScreen *sc) -{ - ScrArea *sa; - - for (sa = sc->areabase.first; sa; sa = sa->next) - BPY_free_scriptlink(&sa->scriptlink); -} - static int CheckAllSpaceHandlers(Text *text) { bScreen *screen; diff --git a/source/blender/src/editscreen.c b/source/blender/src/editscreen.c index 2fdc3bc6025..4154b73ffa5 100644 --- a/source/blender/src/editscreen.c +++ b/source/blender/src/editscreen.c @@ -1836,8 +1836,10 @@ static void del_area(ScrArea *sa) uiFreeBlocks(&sa->uiblocks); uiFreePanels(&sa->panels); - if(sa==curarea) curarea= 0; - if(sa==g_activearea) g_activearea= 0; + BPY_free_scriptlink(&sa->scriptlink); + + if(sa==curarea) curarea= NULL; + if(sa==g_activearea) g_activearea= NULL; } /* sa2 to sa1 */ |