diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-09-04 10:12:54 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-09-04 10:13:21 +0300 |
commit | 621b16468ef72fb88cb1b6833a25479cb5dbd66d (patch) | |
tree | ddb91ec0af6a0469ac1a8c13ba22c6153f861659 | |
parent | 531183dfd8fc89419e779520073aa0a248caedd3 (diff) |
Fix T56675: Crash when snapping Cursor to selected a Bone in Edit Mode.
Seriously...
-rw-r--r-- | source/blender/editors/space_view3d/view3d_snap.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index c33d71b9775..1c2415c67b9 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -621,10 +621,14 @@ static bool snap_curs_to_sel_ex(bContext *C, float cursor[3]) 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; + /* We can do that quick check for meshes only... */ + if (obedit->type == OB_MESH) { + BMEditMesh *em = BKE_editmesh_from_object(obedit); + + if (em->bm->totvertsel == 0) { + continue; + } } if (ED_transverts_check_obedit(obedit)) { |