ENH:add protection when Unable to get filtration supplier information

Change-Id: I64481ace6948cfab67bd864c2925cdce7dcae034
This commit is contained in:
tao wang 2023-04-03 16:57:00 +08:00 committed by Lane.Wei
parent 14c63c9e9e
commit 8dabc0ce97
1 changed files with 5 additions and 1 deletions

View File

@ -3109,7 +3109,11 @@ void SelectMachineDialog::set_default()
std::string filament_type = iter->config.get_filament_type(display_filament_type);
display_materials.push_back(display_filament_type);
materials.push_back(filament_type);
brands.push_back(iter->vendor->name);
if (iter->vendor && !iter->vendor->name.empty())
brands.push_back(iter->vendor->name);
else
brands.push_back("");
}
}
}