FIX: crash on switching printer preset with plate spiral mode enable

jira: STUDIO-8273

Change-Id: I07f04fa6288962c252a92a2dcc0e159c64891d77
This commit is contained in:
liz.li 2024-09-26 11:53:25 +08:00 committed by Lane.Wei
parent 35bf682f79
commit 94644b755c
1 changed files with 2 additions and 1 deletions

View File

@ -1814,7 +1814,8 @@ void Selection::notify_instance_update(int object_idx, int instance_idx)
if (object_idx == -1) if (object_idx == -1)
{ {
std::set<std::pair<int, int>> notify_set; std::set<std::pair<int, int>> notify_set;
for (unsigned int i : m_list) auto list = m_list;
for (unsigned int i : list)
{ {
int obj_index = (*m_volumes)[i]->object_idx(); int obj_index = (*m_volumes)[i]->object_idx();
//-1 means all the instance in this object //-1 means all the instance in this object