mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
fix uninizialized area and maybe deleted value being appended
pout3d may be deleted when array resizes, so copy it
This commit is contained in:
parent
a45cbd6f84
commit
218c4a531b
@ -797,7 +797,7 @@ namespace netgen
|
||||
double area;
|
||||
public:
|
||||
CSurfaceArea (const Mesh & amesh)
|
||||
: mesh(amesh), valid(false) { ; }
|
||||
: mesh(amesh), valid(false), area(0.) { ; }
|
||||
|
||||
void Add (const Element2d & sel)
|
||||
{
|
||||
|
@ -675,7 +675,7 @@ namespace netgen
|
||||
|
||||
|
||||
plainpoints.Append (newpout);
|
||||
const auto& pout3d = locpoints.Get(pouti);
|
||||
auto pout3d = locpoints.Get(pouti);
|
||||
locpoints.Append (pout3d);
|
||||
|
||||
plainzones.Append (0);
|
||||
|
Loading…
Reference in New Issue
Block a user