mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 03:13:39 +00:00
FIX: crash when sending print with empty ams_id
jira: none Change-Id: I89dc87af28b45c69eac86810444de2519dfccd08 (cherry picked from commit f53e00ec6d9350046df4b9dc70cec75039b6d5d1)
This commit is contained in:
@@ -2038,8 +2038,14 @@ bool SelectMachineDialog::get_ams_mapping_result(std::string &mapping_array_str,
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
mapping_item_v1["ams_id"] = std::stoi(m_ams_mapping_result[k].ams_id);
|
if (m_ams_mapping_result[k].ams_id.empty() || m_ams_mapping_result[k].slot_id.empty()) { // invalid case
|
||||||
mapping_item_v1["slot_id"] = std::stoi(m_ams_mapping_result[k].slot_id);
|
mapping_item_v1["ams_id"] = VIRTUAL_TRAY_ID;
|
||||||
|
mapping_item_v1["slot_id"] = VIRTUAL_TRAY_ID;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
mapping_item_v1["ams_id"] = std::stoi(m_ams_mapping_result[k].ams_id);
|
||||||
|
mapping_item_v1["slot_id"] = std::stoi(m_ams_mapping_result[k].slot_id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user