FIX: empty filament map

1.Caused by uninitialized filament map in mapping for AMS

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I71ce6001fc6f2e72eb9303fcaba0bac16ad70dc9
(cherry picked from commit 48023e4c154c118c9396b6065b7e2476970fd441)
This commit is contained in:
xun.zhang
2024-10-15 14:28:45 +08:00
committed by Noisyfox
parent 2c75d2f1b9
commit c362a99a11
2 changed files with 3 additions and 2 deletions

View File

@@ -241,7 +241,7 @@ namespace Slic3r
}
}
if (tmp_cost < ams_color_dist_threshold && tmp_cost < best_cost) {
if (best_map.empty() || (tmp_cost < ams_color_dist_threshold && tmp_cost < best_cost)) {
best_cost = tmp_cost;
best_map = map;
}