FIX: fix crash when not find preset
jira: none Change-Id: I2752294bd0cd0b063c1b164f2f14e96e54f9d9aa (cherry picked from commit b85205f1de76e89e6400e5ecf9e5bfbbe38e6510)
This commit is contained in:
parent
7cc564fcc9
commit
cb435671d0
|
@ -417,6 +417,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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue