diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-04-23 19:38:15 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-04-23 19:38:15 +0300 |
commit | 61ac5dd5bac352bd2f5bf6229ba12357582c2044 (patch) | |
tree | 6f871116180720efd136863001f4265d23b7c73b | |
parent | 372752c7393025342997f8ba6c076576280b3019 (diff) |
Correct missing NULL check (own mistake)
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 3760ebcc2a4..be3cb1c5fe1 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -685,7 +685,9 @@ BMEdge *EDBM_edge_find_nearest_ex( hit = (data.use_cycle && data.hit_cycle.edge) ? &data.hit_cycle : &data.hit; *r_dist = hit->dist; - *r_dist_center = hit->dist_center; + if (r_dist_center) { + *r_dist_center = hit->dist_center; + } prev_select_elem = hit->edge; prev_select_index = hit->index; @@ -844,7 +846,10 @@ BMFace *EDBM_face_find_nearest_ex( mesh_foreachScreenFace(vc, findnearestface__doClosest, &data, clip_flag); hit = (data.use_cycle && data.hit_cycle.face) ? &data.hit_cycle : &data.hit; - *r_dist = *r_dist_center = hit->dist; + *r_dist = hit->dist; + if (r_dist_center) { + *r_dist_center = hit->dist; + } prev_select_elem = hit->face; prev_select_index = hit->index; |