-> Bevel Crash Fix (again)
authorGeoffrey Bantle <hairbat@yahoo.com>
Sun, 24 Feb 2008 12:02:58 +0000 (12:02 +0000)
committerGeoffrey Bantle <hairbat@yahoo.com>
Sun, 24 Feb 2008 12:02:58 +0000 (12:02 +0000)
Last crash fix would leave 2 edged faces laying around, which would cause ANOTHER
crash when converting back to a derived mesh. Fixed now.

source/blender/blenkernel/intern/BME_conversions.c

index c57091a7dae6118bfd874f77c9e67014ad544bec..9d7e06c6fe9f333c019ec4e451e0e54e4c9bcd7f 100644 (file)
@@ -381,7 +381,7 @@ DerivedMesh *BME_bmesh_to_derivedmesh(BME_Mesh *bm, DerivedMesh *dm)
        if(totface){
                mface = CDDM_get_faces(result);
                /*make faces*/
-               for(i=0,f=bm->polys.first;f;f=f->next,i++){
+               for(i=0,f=bm->polys.first;f;f=f->next){
                        mf = &mface[i];
                        len = BME_cycle_length(f->loopbase);
                        if(len==3 || len==4){
@@ -395,6 +395,7 @@ DerivedMesh *BME_bmesh_to_derivedmesh(BME_Mesh *bm, DerivedMesh *dm)
                                if(mf->v3 == 0 || (len == 4 && mf->v4 == 0)){
                                        test_index_face(mf, NULL, i, len);
                                }
+                               i++;
                        }
                        mf->mat_nr = (unsigned char)f->mat_nr;
                        mf->flag = (unsigned char)f->flag;