Fixed memory issues of BedShapeHintwhen using unions of non-trivial objects

This commit is contained in:
bubnikv 2019-08-19 17:01:39 +02:00
parent 92bdb68e11
commit e30a17beb3
2 changed files with 16 additions and 3 deletions

View file

@ -507,9 +507,7 @@ BedShapeHint::BedShapeHint(const Polyline &bed) {
m_type = BedShapes::bsCircle;
m_bed.circ = c;
} else {
if (m_type == BedShapes::bsIrregular)
m_bed.polygon.Slic3r::Polyline::~Polyline();
assert(m_type != BedShapes::bsIrregular);
m_type = BedShapes::bsIrregular;
::new (&m_bed.polygon) Polyline(bed);
}