mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-03-04 09:34:46 -07:00
FIX: crash when tool_change is empty
jira: none Change-Id: Ia2d6fda6847e41054700e37a25179ae2a8d5cd46 (cherry picked from commit c38eb761c6ec5bf8013ba9f4b02ccb09985b4181)
This commit is contained in:
parent
9d3d0b4c4d
commit
c8aa1de66f
1 changed files with 4 additions and 3 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue