Skip to content
Snippets Groups Projects
Commit d3f84b4f authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

bug: fixed nasty double free in GEdge destructor
parent 77ad3d6a
No related branches found
No related tags found
No related merge requests found
// $Id: GEdge.cpp,v 1.24 2007-03-09 14:57:06 remacle Exp $
// $Id: GEdge.cpp,v 1.25 2007-03-18 23:02:26 geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
......@@ -36,7 +36,7 @@ GEdge::GEdge(GModel *model, int tag, GVertex *_v0, GVertex *_v1)
GEdge::~GEdge()
{
if(v0) v0->delEdge(this);
if(v1) v1->delEdge(this);
if(v1 && v1 != v0) v1->delEdge(this);
for(unsigned int i = 0; i < mesh_vertices.size(); i++)
delete mesh_vertices[i];
......@@ -132,7 +132,6 @@ SPoint2 GEdge::reparamOnFace(GFace *face, double epar,int dir) const
return face->parFromPoint(sp3);
}
double GEdge::curvature(double par) const
{
double eps1 = 1.e-3;
......
// $Id: GModel.cpp,v 1.35 2007-03-02 08:44:55 geuzaine Exp $
// $Id: GModel.cpp,v 1.36 2007-03-18 23:02:26 geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
......@@ -45,6 +45,7 @@ void GModel::destroy()
gmshSurface::reset();
Attractor::reset();
}
GRegion * GModel::regionByTag(int n) const
{
GEntity tmp((GModel*)this, n);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment