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>2021-04-15 08:07:36 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-04-15 08:07:36 +0300
commit0bac7682239f2ee117a80ed3ce62a1877331c974 (patch)
treedade3fa351b8029d1b6143581e2dfb802c929b43 /source/blender/bmesh
parentadb21faa83d69069418d7bb14e0211261072f3a9 (diff)
Fix missing NULL checks in adb21faa83d69069418d7bb14e0211261072f3a9
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/operators/bmo_dissolve.c12
1 files changed, 7 insertions, 5 deletions
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;
+ }
}
}
}