[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16337] trunk/blender/source/blender/src/ editmesh.c: Fix segmentation fault when try separate a mesh with the active face selected .

Diego Borghetti bdiego at gmail.com
Tue Sep 2 19:50:56 CEST 2008


Revision: 16337
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16337
Author:   bdiego
Date:     2008-09-02 19:50:54 +0200 (Tue, 02 Sep 2008)

Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/source/blender/src/editmesh.c

Modified: trunk/blender/source/blender/src/editmesh.c
===================================================================
--- trunk/blender/source/blender/src/editmesh.c	2008-09-02 16:39:03 UTC (rev 16336)
+++ trunk/blender/source/blender/src/editmesh.c	2008-09-02 17:50:54 UTC (rev 16337)
@@ -1683,6 +1683,10 @@
 	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);





More information about the Bf-blender-cvs mailing list