From 0bac7682239f2ee117a80ed3ce62a1877331c974 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 15 Apr 2021 15:07:36 +1000 Subject: Fix missing NULL checks in adb21faa83d69069418d7bb14e0211261072f3a9 --- source/blender/bmesh/operators/bmo_dissolve.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'source/blender/bmesh') 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; + } } } } -- cgit v1.2.3