bugfix
- duplicated script spaces would keep a pointer to the PyObject button list. (causing python errors with negative reference counts when freeing spaces) - Exiting blender would crash when a UI was open because the ScriptSpaces button PyList was being free'd after python Py_Finalize was called.
This commit is contained in:
@@ -1154,13 +1154,17 @@ static void unlink_script( Script * script )
|
||||
if( sl->spacetype == SPACE_SCRIPT ) {
|
||||
SpaceScript *sc = ( SpaceScript * ) sl;
|
||||
|
||||
if( sc->script == script ) {
|
||||
if( sc->script == script ) {
|
||||
sc->script = NULL;
|
||||
|
||||
if( sc ==
|
||||
area->spacedata.first ) {
|
||||
scrarea_queue_redraw
|
||||
( area );
|
||||
if( sc == area->spacedata.first ) {
|
||||
scrarea_queue_redraw( area );
|
||||
}
|
||||
|
||||
if (sc->but_refs) {
|
||||
BPy_Set_DrawButtonsList(sc->but_refs);
|
||||
BPy_Free_DrawButtonsList();
|
||||
sc->but_refs = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user