Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Hughes <khughes@pacific.edu>2008-03-28 20:03:34 +0300
committerKen Hughes <khughes@pacific.edu>2008-03-28 20:03:34 +0300
commit4c2b6c4beeb5224c9f1655714e40dd65ff725d61 (patch)
tree7b9190a2fed8192024d133f4c53fd2de00ade905 /source/blender/blenkernel
parent967917ace9bd6be6e737dfa2fa0050676238814c (diff)
Tools
----- Bugfix #6961: in certain circumstances, array modifier would use deleted copies of merged vertices, resulting in memory corruption and crashes.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/modifier.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index 8ba80fd914b..136bf2a300e 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -873,6 +873,9 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
MTC_Mat4MulVecfl(offset, tmp_co);
for(j = 0; j < maxVerts; j++) {
+ /* if vertex already merged, don't use it */
+ if( indexMap[j].merge != -1 ) continue;
+
inMV = &src_mvert[j];
/* if this vert is within merge limit, merge */
if(VecLenCompare(tmp_co, inMV->co, amd->merge_dist)) {
@@ -1032,7 +1035,8 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
numFaces++;
/* if the face has fewer than 3 vertices, don't create it */
- if(mf2->v3 == 0 || (mf->v1 && (mf->v1 == mf->v3 || mf->v1 == mf->v4))) {
+ if(mf2->v3 == 0 || (mf2->v1 && (mf2->v1 == mf2->v3 || mf2->v1 ==
+mf2->v4))) {
numFaces--;
DM_free_face_data(result, numFaces, 1);
}