mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 03:13:39 +00:00
Bugfix: early object destruction caused a segfault when splitting. Also fixed a memory leak and restore background processing when split only detected one part. #2466 #2398
This commit is contained in:
@@ -13,7 +13,7 @@ Model::Model(const Model &other)
|
||||
// copy objects
|
||||
this->objects.reserve(other.objects.size());
|
||||
for (ModelObjectPtrs::const_iterator i = other.objects.begin(); i != other.objects.end(); ++i)
|
||||
this->add_object(**i);
|
||||
this->add_object(**i, true);
|
||||
}
|
||||
|
||||
Model& Model::operator= (Model other)
|
||||
@@ -618,6 +618,7 @@ ModelObject::split(ModelObjectPtrs* new_objects)
|
||||
new_volume->material_id(volume->material_id());
|
||||
|
||||
new_objects->push_back(new_object);
|
||||
delete *mesh;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user