patch from Shane Ambler, free memory when failing to create slide verts.

This commit is contained in:
2010-11-19 17:29:51 +00:00
parent e8647ff5c7
commit 96952b83fa

View File

@@ -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;
}
}