mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
FIX: fix crash when not find preset
jira: none Change-Id: I2752294bd0cd0b063c1b164f2f14e96e54f9d9aa (cherry picked from commit b85205f1de76e89e6400e5ecf9e5bfbbe38e6510) (cherry picked from commit cb435671d0610a88fca6efe1beec3d25d1364acf)
This commit is contained in:
@@ -440,6 +440,8 @@ void PresetComboBox::add_connected_printers(std::string selected, bool alias_nam
|
||||
m_first_printer_idx = GetCount();
|
||||
for (auto iter = machine_list.begin(); iter != machine_list.end(); ++iter) {
|
||||
Preset* printer_preset = get_printer_preset(iter->second);
|
||||
if (!printer_preset)
|
||||
continue;
|
||||
printer_preset->is_visible = true;
|
||||
int item_id = Append(from_u8(iter->second->dev_name), wxNullBitmap, &m_first_printer_idx + std::distance(machine_list.begin(), iter));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user