FIX: safe the ams_id traverse

jira: [none]
Change-Id: I58b7769f843f3dbef8b51a15768711257f590dba
(cherry picked from commit f0efb9af0d1f5df72f2b43d8ffef581d177c49a4)
This commit is contained in:
xin.zhang authored and Noisyfox committed 2025-09-09 15:33:39 +08:00
1 parent 1a27e545a6
commit c04d50f885
3 files changed
+19 -5

No files matched your search

+1 -1
View File
@@ -1199,7 +1199,7 @@ bool MachineObject::need_SD_card() const
int MachineObject::get_extruder_id_by_ams_id(const std::string &ams_id)
{
if (ams_id.empty())
if (ams_id.empty() || (ams_id == "-1"))
return 0;
auto it = amsList.find(ams_id);