mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-30 21:36:57 +00:00
Fix crash when switching profiles
This commit is contained in:
@@ -792,7 +792,7 @@ struct DynamicFilamentList : DynamicList
|
|||||||
std::string type;
|
std::string type;
|
||||||
wxGetApp().preset_bundle->filaments.find_preset(presets[i])->get_filament_type(type);
|
wxGetApp().preset_bundle->filaments.find_preset(presets[i])->get_filament_type(type);
|
||||||
str << type;
|
str << type;
|
||||||
items.push_back({str, icons[i]});
|
items.push_back({str, i < icons.size() ? icons[i] : nullptr});
|
||||||
}
|
}
|
||||||
DynamicList::update();
|
DynamicList::update();
|
||||||
}
|
}
|
||||||
@@ -839,7 +839,7 @@ struct DynamicFilamentList1Based : DynamicFilamentList
|
|||||||
std::string type;
|
std::string type;
|
||||||
wxGetApp().preset_bundle->filaments.find_preset(presets[i])->get_filament_type(type);
|
wxGetApp().preset_bundle->filaments.find_preset(presets[i])->get_filament_type(type);
|
||||||
str << type;
|
str << type;
|
||||||
items.push_back({str, icons[i]});
|
items.push_back({str, i < icons.size() ? icons[i] : nullptr});
|
||||||
}
|
}
|
||||||
DynamicList::update();
|
DynamicList::update();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user