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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user