Skip to content

Commit

Permalink
#2673 Check if a vector is allocated
Browse files Browse the repository at this point in the history
  • Loading branch information
Howard Soh committed Oct 10, 2024
1 parent e59a140 commit 15c2f3f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/libcode/vx_shapedata/shapedata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -733,12 +733,12 @@ Polyline ShapeData::convex_hull_old() const

vector<int> Index(2*data.ny());

//if ( !Index ) {
//
// mlog << Error << "\nShapedata::convex_hull() -> "
// << "memory allocation error\n\n";
// exit(1);
//}
if ( Index.size() < 2*data.ny() ) {

mlog << Error << "\nShapedata::convex_hull() -> "
<< "memory allocation error\n\n";
exit(1);
}

n = 0;

Expand Down Expand Up @@ -1891,7 +1891,7 @@ void ShapeData::threshold(SingleThresh t) {

///////////////////////////////////////////////////////////////////////////////

void ShapeData::set_to_1_or_0()
void ShapeData::set_to_1_or_0()
{
int j;
double v;
Expand Down

0 comments on commit 15c2f3f

Please sign in to comment.