fix [#27266] EdgeSplit + RemoveDoubles + MoveView = Crash
[blender-staging.git] / source / blender / editors / mesh / editmesh_mods.c
index 5ad4f8f274fdf0783ea74fb3cdf8392795a21bd7..8cdbe6707a323f98d7285e48947f69c12f35ab78 100644 (file)
@@ -143,9 +143,10 @@ void EM_automerge(Scene *scene, Object *obedit, int update)
                (obedit && obedit->type==OB_MESH && (obedit->mode & OB_MODE_EDIT))
          ) {
                EditMesh *em= me->edit_mesh;
+               int totvert= em->totvert, totedge= em->totedge, totface= em->totface;
 
                len = removedoublesflag(em, 1, 1, scene->toolsettings->doublimit);
-               if (len) {
+               if (totvert != em->totvert || totedge != em->totedge || totface != em->totface) {
                        if (update) {
                                DAG_id_tag_update(&me->id, 0);
                        }