MeshPart: [skip ci] fix segmentation fault in flatmesh when built with boost.python

This commit is contained in:
wmayer
2020-07-29 13:44:45 +02:00
parent 980ecc87a3
commit a2926df471
2 changed files with 5 additions and 4 deletions

View File

@@ -100,7 +100,7 @@ boost::shared_ptr<FaceUnwrapper> FaceUnwrapper_mesh(const py::object& points,
ColMat<double, 3> coords;
coords.resize(l1.size(), 3);
int row = 0;
for (Py::Sequence::iterator it = l1.begin(); it != l1.end(); ++it) {
for (Py::Sequence::iterator it = l1.begin(); it != l1.end(); ++it, ++row) {
Py::Sequence c(*it);
int col = 0;
for (Py::Sequence::iterator jt = c.begin(); jt != c.end(); ++jt, ++col) {
@@ -112,7 +112,8 @@ boost::shared_ptr<FaceUnwrapper> FaceUnwrapper_mesh(const py::object& points,
Py::Sequence l2(facets.ptr());
ColMat<long, 3> triangles;
triangles.resize(l2.size(), 3);
for (Py::Sequence::iterator it = l2.begin(); it != l2.end(); ++it) {
row = 0;
for (Py::Sequence::iterator it = l2.begin(); it != l2.end(); ++it, ++row) {
Py::Sequence c(*it);
int col = 0;
for (Py::Sequence::iterator jt = c.begin(); jt != c.end(); ++jt, ++col) {