fix for 2 errors introduced since release
- shape key NULL pointer dereference. - use uninitialized variable for bmesh free. also update credits and merge dissolve flag assignment.
This commit is contained in:
@@ -168,9 +168,8 @@ void BM_mesh_data_free(BMesh *bm)
|
||||
BMIter iter;
|
||||
BMIter itersub;
|
||||
|
||||
bool is_ldata_free;
|
||||
bool is_pdata_free;
|
||||
|
||||
const bool is_ldata_free = CustomData_bmesh_has_free(&bm->ldata);
|
||||
const bool is_pdata_free = CustomData_bmesh_has_free(&bm->pdata);
|
||||
|
||||
/* Check if we have to call free, if not we can avoid a lot of looping */
|
||||
if (CustomData_bmesh_has_free(&(bm->vdata))) {
|
||||
@@ -184,9 +183,7 @@ void BM_mesh_data_free(BMesh *bm)
|
||||
}
|
||||
}
|
||||
|
||||
if ((is_ldata_free = CustomData_bmesh_has_free(&(bm->ldata))) ||
|
||||
(is_pdata_free = CustomData_bmesh_has_free(&(bm->pdata))))
|
||||
{
|
||||
if (is_ldata_free || is_pdata_free) {
|
||||
BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) {
|
||||
if (is_pdata_free)
|
||||
CustomData_bmesh_free_block(&(bm->pdata), &(f->head.data));
|
||||
|
@@ -403,8 +403,7 @@ void bmo_dissolve_verts_exec(BMesh *bm, BMOperator *op)
|
||||
}
|
||||
|
||||
BM_ITER_ELEM (f, &fiter, v, BM_FACES_OF_VERT) {
|
||||
BMO_elem_flag_enable(bm, f, FACE_ORIG);
|
||||
BMO_elem_flag_enable(bm, f, FACE_MARK);
|
||||
BMO_elem_flag_enable(bm, f, FACE_MARK | FACE_ORIG);
|
||||
}
|
||||
|
||||
/* check if our additions to the input to face dissolve
|
||||
@@ -412,8 +411,7 @@ void bmo_dissolve_verts_exec(BMesh *bm, BMOperator *op)
|
||||
if (!test_extra_verts(bm, v)) {
|
||||
BM_ITER_ELEM (f, &fiter, v, BM_FACES_OF_VERT) {
|
||||
if (BMO_elem_flag_test(bm, f, FACE_ORIG)) {
|
||||
BMO_elem_flag_disable(bm, f, FACE_MARK);
|
||||
BMO_elem_flag_disable(bm, f, FACE_ORIG);
|
||||
BMO_elem_flag_disable(bm, f, FACE_MARK | FACE_ORIG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -145,7 +145,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
|
||||
|
||||
/* derivedMesh might be needed for solving parenting,
|
||||
* so re-create it here */
|
||||
makeDerivedMesh(scene, obedit, em, CD_MASK_BAREMESH|CD_MASK_ORIGINDEX, 0);
|
||||
makeDerivedMesh(scene, obedit, em, CD_MASK_BAREMESH | CD_MASK_ORIGINDEX, 0);
|
||||
|
||||
BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
|
||||
if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
|
||||
|
@@ -458,10 +458,10 @@ static int shape_key_move_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
SWAP(float, kb_other->pos, kb->pos); /* for absolute shape keys */
|
||||
}
|
||||
|
||||
/* First key is refkey, matches interface and BKE_key_sort */
|
||||
key->refkey = key->block.first;
|
||||
/* First key is refkey, matches interface and BKE_key_sort */
|
||||
key->refkey = key->block.first;
|
||||
}
|
||||
|
||||
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
|
||||
|
Reference in New Issue
Block a user