FIX: crash in new wiper tower

jira: none
Change-Id: I3d9b59b15ab93da201e07670155af28b7596081c
This commit is contained in:
zhimin.zeng 2024-12-25 11:00:50 +08:00 committed by lane.wei
parent ce7a244c3d
commit 620b6053d8
1 changed files with 2 additions and 2 deletions

View File

@ -2657,8 +2657,8 @@ int WipeTower::get_wall_filament_for_all_layer()
} }
//std::vector<std::pair<int, int>> category_counts_vec; //std::vector<std::pair<int, int>> category_counts_vec;
int selected_category = category_counts.begin()->first; int selected_category = -1;
int selected_count = category_counts.begin()->second; int selected_count = 0;
for (auto iter = category_counts.begin(); iter != category_counts.end(); ++iter) { for (auto iter = category_counts.begin(); iter != category_counts.end(); ++iter) {
if (iter->second > selected_count) { if (iter->second > selected_count) {