[Bf-blender-cvs] [0bac7682239] master: Fix missing NULL checks in adb21faa83d69069418d7bb14e0211261072f3a9
Campbell Barton
noreply at git.blender.org
Thu Apr 15 07:08:54 CEST 2021
Commit: 0bac7682239f2ee117a80ed3ce62a1877331c974
Author: Campbell Barton
Date: Thu Apr 15 15:07:36 2021 +1000
Branches: master
https://developer.blender.org/rB0bac7682239f2ee117a80ed3ce62a1877331c974
Fix missing NULL checks in adb21faa83d69069418d7bb14e0211261072f3a9
===================================================================
M source/blender/bmesh/operators/bmo_dissolve.c
===================================================================
diff --git a/source/blender/bmesh/operators/bmo_dissolve.c b/source/blender/bmesh/operators/bmo_dissolve.c
index eb684671cfb..7813e30e2a8 100644
--- a/source/blender/bmesh/operators/bmo_dissolve.c
+++ b/source/blender/bmesh/operators/bmo_dissolve.c
@@ -327,7 +327,7 @@ void bmo_dissolve_edges_exec(BMesh *bm, BMOperator *op)
/* join faces */
f_new = BM_faces_join_pair(bm, l_a, l_b, false);
- if (BM_face_find_double(f_new)) {
+ if (f_new && BM_face_find_double(f_new)) {
BM_face_kill(bm, f_new);
f_new = NULL;
}
@@ -445,14 +445,16 @@ void bmo_dissolve_verts_exec(BMesh *bm, BMOperator *op)
/* join faces */
f_new = BM_faces_join_pair(bm, l_a, l_b, false);
- if (BM_face_find_double(f_new)) {
+ if (f_new && BM_face_find_double(f_new)) {
BM_face_kill(bm, f_new);
f_new = NULL;
}
- /* maintain active face */
- if (act_face && bm->act_face == NULL) {
- bm->act_face = f_new;
+ if (f_new) {
+ /* maintain active face */
+ if (act_face && bm->act_face == NULL) {
+ bm->act_face = f_new;
+ }
}
}
}
More information about the Bf-blender-cvs
mailing list