mirror of https://github.com/vitalif/openscad
crash fix: forgot null check of missing dxf
parent
acace4606b
commit
0c8a34775f
|
@ -693,12 +693,12 @@ Response GeometryEvaluator::visit(State &state, const LinearExtrudeNode &node)
|
|||
if (state.isPostfix()) {
|
||||
shared_ptr<const Geometry> geom;
|
||||
if (!isCached(node)) {
|
||||
const Geometry *geometry;
|
||||
const Geometry *geometry = NULL;
|
||||
if (!node.filename.empty()) {
|
||||
DxfData dxf(node.fn, node.fs, node.fa, node.filename, node.layername, node.origin_x, node.origin_y, node.scale_x);
|
||||
|
||||
Polygon2d *p2d = dxf.toPolygon2d();
|
||||
geometry = ClipperUtils::sanitize(*p2d);
|
||||
if (p2d) geometry = ClipperUtils::sanitize(*p2d);
|
||||
}
|
||||
else {
|
||||
geometry = applyToChildren2D(node, OPENSCAD_UNION);
|
||||
|
@ -789,11 +789,11 @@ Response GeometryEvaluator::visit(State &state, const RotateExtrudeNode &node)
|
|||
if (state.isPostfix()) {
|
||||
shared_ptr<const Geometry> geom;
|
||||
if (!isCached(node)) {
|
||||
const Geometry *geometry;
|
||||
const Geometry *geometry = NULL;
|
||||
if (!node.filename.empty()) {
|
||||
DxfData dxf(node.fn, node.fs, node.fa, node.filename, node.layername, node.origin_x, node.origin_y, node.scale);
|
||||
Polygon2d *p2d = dxf.toPolygon2d();
|
||||
geometry = ClipperUtils::sanitize(*p2d);
|
||||
if (p2d) geometry = ClipperUtils::sanitize(*p2d);
|
||||
}
|
||||
else {
|
||||
geometry = applyToChildren2D(node, OPENSCAD_UNION);
|
||||
|
|
Loading…
Reference in New Issue