diff options
author | Diego Borghetti <bdiego@gmail.com> | 2008-09-02 21:50:54 +0400 |
---|---|---|
committer | Diego Borghetti <bdiego@gmail.com> | 2008-09-02 21:50:54 +0400 |
commit | dcbf8fbf76bda8f6084f5317a8cdd98ab6314df3 (patch) | |
tree | 8a616582a9d315312a28b089f8e4eedcb830cf2d /source/blender/src/editmesh.c | |
parent | ead69661e814218290abcf3cf010f8b0d8e7e986 (diff) |
Fix segmentation fault when try separate a mesh with the active face selected.
If the active face is part of the selection, Blender crash when
split the mesh because the act_face have an invalid pointer.
The solution is simple, check if the active face is part of the selection
and in that case, set it to NULL.
Campbell please double check this.
Diffstat (limited to 'source/blender/src/editmesh.c')
-rw-r--r-- | source/blender/src/editmesh.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/src/editmesh.c b/source/blender/src/editmesh.c index 188f7476728..b75f7e07143 100644 --- a/source/blender/src/editmesh.c +++ b/source/blender/src/editmesh.c @@ -1683,6 +1683,10 @@ void separate_mesh(void) efa= em->faces.first; while(efa) { vl1= efa->next; + if (efa == G.editMesh->act_face && (efa->f & SELECT)) { + EM_set_actFace(NULL); + } + if((efa->f & SELECT)==0) { BLI_remlink(&em->faces, efa); BLI_addtail(&edvl, efa); |