fix [#27011] executing a script crashes Blender
This commit is contained in:
@@ -964,7 +964,22 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
|
|||||||
t->options |= CTX_EDGE;
|
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)
|
if(t->spacetype == SPACE_VIEW3D)
|
||||||
{
|
{
|
||||||
View3D *v3d = sa->spacedata.first;
|
View3D *v3d = sa->spacedata.first;
|
||||||
|
|||||||
Reference in New Issue
Block a user