forked from bartvdbraak/blender
[#18654] different behaviour if script is called from (1) Menu (2) TextEditor (3) ScriptsWindow [including crash!]
bugfix, simple NULL check
This commit is contained in:
parent
bb3fa18a95
commit
742ddade12
@ -915,12 +915,12 @@ static PyObject *Method_Exit( PyObject * self )
|
||||
exit_pydraw( sc, 0 );
|
||||
|
||||
script = sc->script;
|
||||
|
||||
if(script) { /* in very rare cases this can be NULL, (when saving and loading see bug #18654)*/
|
||||
/* remove our lock to the current namespace */
|
||||
script->flags &= ~SCRIPT_GUI;
|
||||
script->scriptname[0] = '\0';
|
||||
script->scriptarg[0] = '\0';
|
||||
|
||||
}
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user