mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
fix [#27011] executing a script crashes Blender
This commit is contained in:
parent
6bdb5e75ce
commit
ba229e3859
1 changed files with 16 additions and 1 deletions
|
|
@ -964,7 +964,22 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
|
|||
t->options |= CTX_EDGE;
|
||||
}
|
||||
|
||||
t->spacetype = sa ? sa->spacetype : SPACE_EMPTY; /* background mode */
|
||||
|
||||
/* Assign the space type, some exceptions for running in different mode */
|
||||
if(sa == NULL) {
|
||||
/* background mode */
|
||||
t->spacetype= SPACE_EMPTY;
|
||||
}
|
||||
else if ((ar == NULL) && (sa->spacetype == SPACE_VIEW3D)) {
|
||||
/* running in the text editor */
|
||||
t->spacetype= SPACE_EMPTY;
|
||||
}
|
||||
else {
|
||||
/* normal operation */
|
||||
t->spacetype= sa->spacetype;
|
||||
}
|
||||
|
||||
|
||||
if(t->spacetype == SPACE_VIEW3D)
|
||||
{
|
||||
View3D *v3d = sa->spacedata.first;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue