FIX: [7085] crash when connected printer

Jira: STUDIO-7085

Change-Id: I8509a4261885b255dac2e4423f6e641f942f762c
This commit is contained in:
maosheng.wei 2024-05-15 16:10:16 +08:00 committed by Lane.Wei
parent 461af9e8f6
commit 3b2b9e5893
1 changed files with 1 additions and 0 deletions

View File

@ -1865,6 +1865,7 @@ bool PresetBundle::check_filament_temp_equation_by_printer_type_and_nozzle_for_m
std::map<std::string, std::vector<Preset const *>> filament_list = filaments.get_filament_presets();
std::set<std::string> printer_names = get_printer_names_by_printer_type_and_nozzle(printer_type, nozzle_diameter_str);
if (filament_list.find(setting_id) == filament_list.end()) return is_equation;
for (const Preset *preset : filament_list.find(setting_id)->second) {
if (tag_uid == "0" || (tag_uid.size() == 16 && tag_uid.substr(12, 2) == "01")) continue;
if (preset && !preset->is_user()) continue;