Fix T65330: Blender crash when double click on face
The fix itself is by Germano Cavalcante (mano-wii). But since I was investigating this with him, I'm including here an assert in EDBM_select_id_bm_elem_get to help catching this sooner in the future
This commit is contained in:
parent
6f9518f243
commit
d5b813301a
Notes:
blender-bot
2023-02-14 02:22:11 +01:00
Referenced by issue #65377, Crash when clicking on face in edit mode Referenced by issue #65330, Blender crash when double click on face with subsurf modifier
|
@ -2757,7 +2757,7 @@ static void mesh_create_edit_facedots_select_id(MeshRenderData *rdata, GPUVertBu
|
|||
if (p_orig != ORIGINDEX_NONE) {
|
||||
const BMFace *efa = BM_face_at_index(rdata->edit_bmesh->bm, p_orig);
|
||||
if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
|
||||
*((uint *)GPU_vertbuf_raw_step(&idx_step)) = poly;
|
||||
*((uint *)GPU_vertbuf_raw_step(&idx_step)) = p_orig;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -302,6 +302,11 @@ BMElem *EDBM_select_id_bm_elem_get(struct EDBMSelectID_Context *sel_id_ctx,
|
|||
}
|
||||
}
|
||||
|
||||
if (base_index >= sel_id_ctx->bases_len) {
|
||||
BLI_assert(0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (r_base_index) {
|
||||
*r_base_index = base_index;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue