mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-18 05:35:55 +08:00
ENH:add protection for invalid nozzle data
jira:[invalid nozzle data] Change-Id: I56983af991bc3e9f69c2d30429987bb860618eaf
This commit is contained in:
parent
7831a55f70
commit
9b3de1bd3f
@ -5663,6 +5663,10 @@ void MachineObject::parse_new_info(json print)
|
||||
} else if (type.substr(2, 2) == std::string("01")) {
|
||||
nozzle_obj.nozzle_type = NozzleType::ntHardenedSteel;
|
||||
}
|
||||
} else {
|
||||
nozzle_obj.tool_type = NozzleToolType::NONE_TOOLTYPE;
|
||||
nozzle_obj.nozzle_flow = NozzleFlowType::NONE_FLOWTYPE;
|
||||
nozzle_obj.nozzle_type = NozzleType::ntUndefine;
|
||||
}
|
||||
|
||||
nozzle_obj.diameter = njon["diameter"].get<float>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user