Revision: 15621
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15621
Author:   campbellbarton
Date:     2008-07-18 15:05:15 +0200 (Fri, 18 Jul 2008)

Log Message:
-----------
own error, recent commit that tried to keep an active face could crash when 
deleting faces.

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

Modified: trunk/blender/source/blender/src/editmesh.c
===================================================================
--- trunk/blender/source/blender/src/editmesh.c 2008-07-18 13:04:15 UTC (rev 
15620)
+++ trunk/blender/source/blender/src/editmesh.c 2008-07-18 13:05:15 UTC (rev 
15621)
@@ -340,8 +340,9 @@
 #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 @@
        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 */

Modified: trunk/blender/source/blender/src/editmesh_lib.c
===================================================================
--- trunk/blender/source/blender/src/editmesh_lib.c     2008-07-18 13:04:15 UTC 
(rev 15620)
+++ trunk/blender/source/blender/src/editmesh_lib.c     2008-07-18 13:05:15 UTC 
(rev 15621)
@@ -72,12 +72,7 @@
 /* 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)


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to