Fix invalid string access in BoundaryLayerTool

When AddFaceDescriptor reallocates the array the fd reference becomes
dangling.

See #203
This commit is contained in:
Stefan Brüns 2024-12-20 14:29:28 +01:00
parent 975414c2fe
commit 8cb4518f33

View File

@ -723,7 +723,8 @@ namespace netgen
new_fd.SetBCProperty(new_si);
mesh.AddFaceDescriptor(new_fd);
si_map[facei] = new_si;
mesh.SetBCName(new_si-1, fd.GetBCName());
// AddFaceDescriptor may reallocate, fd is invalidated
mesh.SetBCName(new_si-1, mesh.GetFaceDescriptor(facei).GetBCName());
face_done.SetBit(facei);
}
}