Fix T56679: Blender 2.8 crashes with bezier curve snap.

Follow up to rB621b16468ef72fb actually... Seriously... :/
This commit is contained in:
Bastien Montagne 2018-09-04 14:30:25 +02:00
parent 4dfc846fe3
commit f1de256ea0
Notes: blender-bot 2023-02-14 08:42:54 +01:00
Referenced by issue #56679, Blender 2.8 crashes with bezier curve snap
1 changed files with 12 additions and 6 deletions

View File

@ -93,10 +93,13 @@ static int snap_sel_to_grid_exec(bContext *C, wmOperator *UNUSED(op))
Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data(view_layer, &objects_len);
for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
obedit = objects[ob_index];
BMEditMesh *em = BKE_editmesh_from_object(obedit);
if (em->bm->totvertsel == 0) {
continue;
if (obedit->type == OB_MESH) {
BMEditMesh *em = BKE_editmesh_from_object(obedit);
if (em->bm->totvertsel == 0) {
continue;
}
}
if (ED_transverts_check_obedit(obedit)) {
@ -268,10 +271,13 @@ static int snap_selected_to_location(bContext *C, const float snap_target_global
Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data(view_layer, &objects_len);
for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
obedit = objects[ob_index];
BMEditMesh *em = BKE_editmesh_from_object(obedit);
if (em->bm->totvertsel == 0) {
continue;
if (obedit->type == OB_MESH) {
BMEditMesh *em = BKE_editmesh_from_object(obedit);
if (em->bm->totvertsel == 0) {
continue;
}
}
if (ED_transverts_check_obedit(obedit)) {