Fix T39331: Dissolve vertex crash

This commit is contained in:
Campbell Barton 2014-03-24 16:37:10 +11:00
parent 32d5d072a0
commit b69809c820
Notes: blender-bot 2023-02-14 10:56:44 +01:00
Referenced by issue #39331, Disolve vertex crash blender.
1 changed files with 9 additions and 7 deletions

View File

@ -205,14 +205,16 @@ bool BM_disk_dissolve(BMesh *bm, BMVert *v)
return false;
}
/* get remaining two faces */
f = e->l->f;
f2 = e->l->radial_next->f;
if (e->l) {
/* get remaining two faces */
f = e->l->f;
f2 = e->l->radial_next->f;
if (f != f2) {
/* join two remaining faces */
if (!BM_faces_join_pair(bm, f, f2, e, true)) {
return false;
if (f != f2) {
/* join two remaining faces */
if (!BM_faces_join_pair(bm, f, f2, e, true)) {
return false;
}
}
}
}