Fix crash introduced w/ snap refactor

Create snapping context when in the 3d view,
transforming pose bones and grease-pencil crashed.
This commit is contained in:
Campbell Barton
2016-05-09 15:21:53 +10:00
parent dc4c3ce592
commit 73fab5bb3f

View File

@@ -596,7 +596,6 @@ static void initSnappingMode(TransInfo *t)
t->tsnap.mode = SCE_SNAP_MODE_INCREMENT;
}
if (t->flag & (T_OBJECT | T_EDIT)) {
if (t->spacetype == SPACE_VIEW3D) {
if (t->tsnap.object_context == NULL) {
t->tsnap.object_context = ED_transform_snap_object_context_create_view3d(
@@ -611,7 +610,6 @@ static void initSnappingMode(TransInfo *t)
SET_UINT_IN_POINTER((BM_ELEM_SELECT | BM_ELEM_HIDDEN)));
}
}
}
}
void initSnapping(TransInfo *t, wmOperator *op)