fix remaining crash from [#27035] 3 problems: crash and enum "REGION" not found in ('VERTS')
This commit is contained in:
@@ -5323,7 +5323,7 @@ void createTransData(bContext *C, TransInfo *t)
|
||||
sort_trans_data_dist(t);
|
||||
}
|
||||
|
||||
if (t->ar->regiontype == RGN_TYPE_WINDOW)
|
||||
if ((t->spacetype == SPACE_VIEW3D) && (t->ar->regiontype == RGN_TYPE_WINDOW))
|
||||
{
|
||||
View3D *v3d = t->view;
|
||||
RegionView3D *rv3d = CTX_wm_region_view3d(C);
|
||||
|
||||
@@ -1039,9 +1039,14 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
|
||||
}
|
||||
else
|
||||
{
|
||||
// XXX for now, get View2D from the active region
|
||||
t->view = &ar->v2d;
|
||||
// XXX for now, the center point is the midpoint of the data
|
||||
if(ar) {
|
||||
// XXX for now, get View2D from the active region
|
||||
t->view = &ar->v2d;
|
||||
// XXX for now, the center point is the midpoint of the data
|
||||
}
|
||||
else {
|
||||
t->view= NULL;
|
||||
}
|
||||
t->around = V3D_CENTER;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user