Memory for bevelSplitFlag wasn't duplicated in copy_displist.
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 3 Jan 2011 19:45:08 +0000 (19:45 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 3 Jan 2011 19:45:08 +0000 (19:45 +0000)
Also corrected memory allocation comment for this array.

source/blender/blenkernel/intern/displist.c

index a6957d6ead137bbbdb4f701f6ef31cae559cd39d..0ee85624bee9e54db940e5e3a45b6e54eb8db621 100644 (file)
@@ -150,7 +150,10 @@ void copy_displist(ListBase *lbn, ListBase *lb)
                dln->index= MEM_dupallocN(dl->index);
                dln->col1= MEM_dupallocN(dl->col1);
                dln->col2= MEM_dupallocN(dl->col2);
-               
+
+               if(dl->bevelSplitFlag)
+                       dln->bevelSplitFlag= MEM_dupallocN(dl->bevelSplitFlag);
+
                dl= dl->next;
        }
 }
@@ -1790,7 +1793,7 @@ static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispba
                                                        /* CU_2D conflicts with R_NOPUNOFLIP */
                                                        dl->rt= nu->flag & ~CU_2D;
 
-                                                       dl->bevelSplitFlag= MEM_callocN(sizeof(*dl->col2)*((bl->nr+0x1F)>>5), "col2");
+                                                       dl->bevelSplitFlag= MEM_callocN(sizeof(*dl->col2)*((bl->nr+0x1F)>>5), "bevelSplitFlag");
                                                        bevp= (BevPoint *)(bl+1);
        
                                                        /* for each point of poly make a bevel piece */