FIX: Client crash when opening 3mf file of older version

Jira: STUDIO-13381
Change-Id: I9065c215758d035cd6de3cc11519285663046bfb
(cherry picked from commit d73756c59729e5525b013d989c154678cf344fee)
This commit is contained in:
weiting.ji
2025-07-16 18:49:40 +08:00
committed by Noisyfox
parent 3c17c26573
commit 8fc53b4312

View File

@@ -612,6 +612,9 @@ wxBitmap *get_extruder_color_icon(std::vector<std::string> colors, bool is_gradi
for (const auto& color_str : colors) {
wx_colors.push_back(wxColour(color_str));
}
if (wx_colors.empty()) {
wx_colors.push_back(wxColour("#636363")); // default color if no colors provided
}
// create filament bitmap in multi color
wxBitmap base_bitmap = Slic3r::GUI::create_filament_bitmap(wx_colors, wxSize(icon_width, icon_height), is_gradient);