own error, recent commit that tried to keep an active face could crash when deleting faces.
This commit is contained in:
parent
c216c980d3
commit
6786c517af
@ -340,8 +340,9 @@ void free_editface(EditFace *efa)
|
||||
#endif
|
||||
EM_remove_selection(efa, EDITFACE);
|
||||
|
||||
if (G.editMesh->act_face==efa)
|
||||
EM_set_actFace(NULL);
|
||||
if (G.editMesh->act_face==efa) {
|
||||
EM_set_actFace( G.editMesh->faces.first == efa ? NULL : G.editMesh->faces.first);
|
||||
}
|
||||
|
||||
CustomData_em_free_block(&G.editMesh->fdata, &efa->data);
|
||||
if(efa->fast==0)
|
||||
@ -1061,7 +1062,7 @@ void make_editMesh()
|
||||
EM_fgon_flags();
|
||||
|
||||
if (EM_get_actFace(0)==NULL) {
|
||||
EM_set_actFace(NULL); /* will use the first face, this is so we alwats have an active face */
|
||||
EM_set_actFace( G.editMesh->faces.first ); /* will use the first face, this is so we alwats have an active face */
|
||||
}
|
||||
|
||||
/* vertex coordinates change with cache edit, need to recalc */
|
||||
|
@ -72,12 +72,7 @@ editmesh_lib: generic (no UI, no menus) operations/evaluators for editmesh data
|
||||
/* this replaces the active flag used in uv/face mode */
|
||||
void EM_set_actFace(EditFace *efa)
|
||||
{
|
||||
if (efa) {
|
||||
G.editMesh->act_face = efa;
|
||||
} else {
|
||||
/* True or NULL if we have no faces, so we always have an active face */
|
||||
G.editMesh->act_face = G.editMesh->faces.first;
|
||||
}
|
||||
G.editMesh->act_face = efa;
|
||||
}
|
||||
|
||||
EditFace * EM_get_actFace(int sloppy)
|
||||
|
Loading…
Reference in New Issue
Block a user