code cleanup:
[blender.git] / source / blender / editors / space_info / info_stats.c
index cf003d8c1eb29d4f8812290f5f44660ca7bac38f..120783db3406006047011b3827bdcab0eedf3512 100644 (file)
@@ -140,7 +140,7 @@ static void stats_object(Object *ob, int sel, int totob, SceneStats *stats)
 static void stats_object_edit(Object *obedit, SceneStats *stats)
 {
        if(obedit->type==OB_MESH) {
-               BMEditMesh *em = ((Mesh*)obedit->data)->edit_btmesh;
+               BMEditMesh *em = BMEdit_FromObject(obedit);
 
                stats->totvert = em->bm->totvert;
                stats->totvertsel = em->bm->totvertsel;