patch from Shane Ambler, free memory when failing to create slide verts.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user