code cleanup:
[blender-staging.git] / source / blender / editors / mesh / bmesh_utils.c
index 830534e331521aefeae940ee96d266985c8a11df..892184e94ad0b489e9fb1fc35f05c256e075f14e 100644 (file)
@@ -245,7 +245,7 @@ void EDBM_selectmode_to_scene(bContext *C)
 {
        Scene *scene = CTX_data_scene(C);
        Object *obedit = CTX_data_edit_object(C);
-       BMEditMesh *em = ((Mesh *)obedit->data)->edit_btmesh;
+       BMEditMesh *em = BMEdit_FromObject(obedit);
 
        if (!em)
                return;