Fix crash when start_extruder_id is empty (#9584)

Fix crash when `start_extruder_id` is empty (SoftFever/OrcaSlicer#9580)
This commit is contained in:
Noisyfox 2025-05-09 22:47:18 +08:00 committed by GitHub
parent f0384e7bc3
commit 9b18c82bfb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -38,7 +38,7 @@ static std::vector<unsigned int> solve_extruder_order(const std::vector<std::vec
std::swap(*all_extruders.begin(), *start_iter); std::swap(*all_extruders.begin(), *start_iter);
} }
else { else {
*start_extruder_id = all_extruders.front(); start_extruder_id = all_extruders.front();
} }
unsigned int iterations = (1 << all_extruders.size()); unsigned int iterations = (1 << all_extruders.size());