Performance optimizations and bugfix

This commit is contained in:
tamasmeszaros 2020-09-04 20:20:06 +02:00
parent 3b7ea5587e
commit d527122046
2 changed files with 16 additions and 3 deletions

View file

@ -13,7 +13,8 @@ namespace Slic3r { namespace GUI {
void RotoptimizeJob::process()
{
int obj_idx = m_plater->get_selected_object_idx();
if (obj_idx < 0) { return; }
if (obj_idx < 0 || m_plater->sla_print().objects().size() <= obj_idx)
return;
ModelObject *o = m_plater->model().objects[size_t(obj_idx)];
const SLAPrintObject *po = m_plater->sla_print().objects()[size_t(obj_idx)];