diff --git a/src/libslic3r/GCode/WipeTower.cpp b/src/libslic3r/GCode/WipeTower.cpp index 289fab4b9..a1b30f9de 100644 --- a/src/libslic3r/GCode/WipeTower.cpp +++ b/src/libslic3r/GCode/WipeTower.cpp @@ -2657,8 +2657,8 @@ int WipeTower::get_wall_filament_for_all_layer() } //std::vector> category_counts_vec; - int selected_category = category_counts.begin()->first; - int selected_count = category_counts.begin()->second; + int selected_category = -1; + int selected_count = 0; for (auto iter = category_counts.begin(); iter != category_counts.end(); ++iter) { if (iter->second > selected_count) {