mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-14 09:02:06 +00:00
FIX: crash when tool_change is empty
jira: none Change-Id: Ia2d6fda6847e41054700e37a25179ae2a8d5cd46 (cherry picked from commit c38eb761c6ec5bf8013ba9f4b02ccb09985b4181)
This commit is contained in:
@@ -3956,9 +3956,10 @@ void WipeTower::generate_new(std::vector<std::vector<WipeTower::ToolChangeResult
|
||||
finish_layer_filament = block.last_nozzle_change_id;
|
||||
}
|
||||
|
||||
WipeTowerBlock * last_layer_finish_block = get_block_by_category(get_filament_category(layer.tool_changes.front().old_tool), false);
|
||||
if (!layer.tool_changes.empty() && last_layer_finish_block && last_layer_finish_block->block_id == block.block_id && finish_layer_filament == -1) {
|
||||
finish_layer_filament = layer.tool_changes.front().old_tool;
|
||||
if (!layer.tool_changes.empty()) {
|
||||
WipeTowerBlock * last_layer_finish_block = get_block_by_category(get_filament_category(layer.tool_changes.front().old_tool), false);
|
||||
if (last_layer_finish_block && last_layer_finish_block->block_id == block.block_id && finish_layer_filament == -1)
|
||||
finish_layer_filament = layer.tool_changes.front().old_tool;
|
||||
}
|
||||
|
||||
if (finish_layer_filament == -1) {
|
||||
|
||||
Reference in New Issue
Block a user