From 8dabc0ce9730a982e1e9716a567f81e48313213b Mon Sep 17 00:00:00 2001 From: tao wang Date: Mon, 3 Apr 2023 16:57:00 +0800 Subject: [PATCH] ENH:add protection when Unable to get filtration supplier information Change-Id: I64481ace6948cfab67bd864c2925cdce7dcae034 --- src/slic3r/GUI/SelectMachine.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/SelectMachine.cpp b/src/slic3r/GUI/SelectMachine.cpp index 57d5fcd87..fec4104ee 100644 --- a/src/slic3r/GUI/SelectMachine.cpp +++ b/src/slic3r/GUI/SelectMachine.cpp @@ -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(""); } } }