diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-11-19 20:29:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-11-19 20:29:51 +0300 |
commit | 96952b83fa264117f5e2b6931360dfb661885a70 (patch) | |
tree | 79d28c494c04a6c4d8753c580f348ec0507ab768 | |
parent | e8647ff5c70de8f7a11cdef0f0c6d19650a629f5 (diff) |
patch from Shane Ambler, free memory when failing to create slide verts.
-rw-r--r-- | source/blender/editors/transform/transform.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 4bd3ee4a791..c77ce177cdc 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -4271,6 +4271,7 @@ static int createSlideVerts(TransInfo *t) efa->e1->f1++; if(efa->e1->f1 > 2) { //BKE_report(op->reports, RPT_ERROR, "3+ face edge"); + MEM_freeN(sld); return 0; } } @@ -4279,6 +4280,7 @@ static int createSlideVerts(TransInfo *t) efa->e2->f1++; if(efa->e2->f1 > 2) { //BKE_report(op->reports, RPT_ERROR, "3+ face edge"); + MEM_freeN(sld); return 0; } } @@ -4287,6 +4289,7 @@ static int createSlideVerts(TransInfo *t) efa->e3->f1++; if(efa->e3->f1 > 2) { //BKE_report(op->reports, RPT_ERROR, "3+ face edge"); + MEM_freeN(sld); return 0; } } @@ -4295,13 +4298,15 @@ static int createSlideVerts(TransInfo *t) efa->e4->f1++; if(efa->e4->f1 > 2) { //BKE_report(op->reports, RPT_ERROR, "3+ face edge"); + MEM_freeN(sld); return 0; } } // Make sure loop is not 2 edges of same face if(ct > 1) { //BKE_report(op->reports, RPT_ERROR, "Loop crosses itself"); - return 0; + MEM_freeN(sld); + return 0; } } @@ -4313,6 +4318,7 @@ static int createSlideVerts(TransInfo *t) // Test for multiple segments if(vertsel > numsel+1) { //BKE_report(op->reports, RPT_ERROR, "Please choose a single edge loop"); + MEM_freeN(sld); return 0; } @@ -4349,6 +4355,7 @@ static int createSlideVerts(TransInfo *t) if(timesthrough >= numsel*2) { BLI_linklist_free(edgelist,NULL); //BKE_report(op->reports, RPT_ERROR, "Could not order loop"); + MEM_freeN(sld); return 0; } } |