Fixed a memory leak when repairing an external stl

This commit is contained in:
Lukas Matena 2021-04-26 20:44:53 +02:00
parent 978b359492
commit da702ab135

View file

@ -1483,10 +1483,10 @@ void MainFrame::repair_stl()
output_file = dlg.GetPath();
}
auto tmesh = new Slic3r::TriangleMesh();
tmesh->ReadSTLFile(input_file.ToUTF8().data());
tmesh->repair();
tmesh->WriteOBJFile(output_file.ToUTF8().data());
Slic3r::TriangleMesh tmesh;
tmesh.ReadSTLFile(input_file.ToUTF8().data());
tmesh.repair();
tmesh.WriteOBJFile(output_file.ToUTF8().data());
Slic3r::GUI::show_info(this, L("Your file was repaired."), L("Repair"));
}