FIX: crash when tool_change is empty
jira: none Change-Id: Ia2d6fda6847e41054700e37a25179ae2a8d5cd46
This commit is contained in:
parent
9d93dd7d98
commit
c38eb761c6
|
@ -3963,8 +3963,9 @@ void WipeTower::generate_new(std::vector<std::vector<WipeTower::ToolChangeResult
|
|||
finish_layer_filament = block.last_nozzle_change_id;
|
||||
}
|
||||
|
||||
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 (!layer.tool_changes.empty() && last_layer_finish_block && last_layer_finish_block->block_id == block.block_id && finish_layer_filament == -1) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue