Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-05-03 08:18:23 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-03 08:18:23 +0400
commit2865e072c9aa93cd51da9c52a8dab35fab48c160 (patch)
tree843e3b154283ec09b7fed645636e3bb9e6724b88
parentb0cd0a0577016c668e3105ad17a6c3890543e74a (diff)
fix [#27266] EdgeSplit + RemoveDoubles + MoveView = Crash
-rw-r--r--source/blender/editors/mesh/editmesh_mods.c3
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c
index 5ad4f8f274f..8cdbe6707a3 100644
--- a/source/blender/editors/mesh/editmesh_mods.c
+++ b/source/blender/editors/mesh/editmesh_mods.c
@@ -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);
}
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index a66c72bf329..a78029da079 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -483,10 +483,11 @@ static int removedoublesflag_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
+ int totvert= em->totvert, totedge= em->totedge, totface= em->totface;
int count = removedoublesflag(em,1,0,RNA_float_get(op->ptr, "limit"));
- if(count) {
+ if (totvert != em->totvert || totedge != em->totedge || totface != em->totface) {
recalc_editnormals(em);
DAG_id_tag_update(obedit->data, 0);
@@ -5919,6 +5920,7 @@ static int merge_exec(bContext *C, wmOperator *op)
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
int count= 0, uvs= RNA_boolean_get(op->ptr, "uvs");
EditSelection *ese;
+ int totvert= em->totvert, totedge= em->totedge, totface= em->totface;
switch(RNA_enum_get(op->ptr, "type")) {
case 3:
@@ -5949,7 +5951,7 @@ static int merge_exec(bContext *C, wmOperator *op)
break;
}
- if(!count)
+ if (!(totvert != em->totvert || totedge != em->totedge || totface != em->totface))
return OPERATOR_CANCELLED;
recalc_editnormals(em);