diff options
author | Marius Kintel <marius@kintel.net> | 2012-02-03 21:18:12 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2012-02-03 21:18:12 (GMT) |
commit | d7ee4e4f3c17667c0a5bdb3b68d4485ce79869dd (patch) | |
tree | df9e3f9a43896fa552e78f3efca4628d76f8fb99 /src | |
parent | cae419d5479b966fd5759dfa533ad352549c32f9 (diff) | |
parent | 7a4b75630f619dfd64618d3f1c24da859f9e4a13 (diff) |
Merge branch 'master' of github.com:openscad/openscad
Diffstat (limited to 'src')
-rw-r--r-- | src/PolySetCGALEvaluator.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/PolySetCGALEvaluator.cc b/src/PolySetCGALEvaluator.cc index c3f4774..22567f2 100644 --- a/src/PolySetCGALEvaluator.cc +++ b/src/PolySetCGALEvaluator.cc @@ -90,6 +90,7 @@ PolySet *PolySetCGALEvaluator::evaluatePolySet(const ProjectionNode &node) } PolySet *ps3 = sum.convertToPolyset(); + if (!ps3) return NULL; Grid2d<int> conversion_grid(GRID_COARSE); for (size_t i = 0; i < ps3->polygons.size(); i++) { for (size_t j = 0; j < ps3->polygons[i].size(); j++) { @@ -121,6 +122,7 @@ PolySet *PolySetCGALEvaluator::evaluatePolySet(const ProjectionNode &node) } PolySet *ps3 = sum.convertToPolyset(); + if (!ps3) return NULL; CGAL_Nef_polyhedron np; for (size_t i = 0; i < ps3->polygons.size(); i++) { @@ -385,7 +387,7 @@ PolySet *PolySetCGALEvaluator::evaluatePolySet(const CgaladvNode &node) PolySet *ps = NULL; if (!N.empty()) { ps = N.convertToPolyset(); - ps->convexity = node.convexity; + if (ps) ps->convexity = node.convexity; } return ps; @@ -401,7 +403,7 @@ PolySet *PolySetCGALEvaluator::evaluatePolySet(const RenderNode &node) } else { ps = N.convertToPolyset(); - ps->convexity = node.convexity; + if (ps) ps->convexity = node.convexity; } } return ps; |