mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-08 18:39:01 +08:00
FIX: crash when tool_change is empty
jira: none Change-Id: Ia2d6fda6847e41054700e37a25179ae2a8d5cd46
This commit is contained in:
parent
9d93dd7d98
commit
c38eb761c6
@ -3963,9 +3963,10 @@ void WipeTower::generate_new(std::vector<std::vector<WipeTower::ToolChangeResult
|
|||||||
finish_layer_filament = block.last_nozzle_change_id;
|
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()) {
|
||||||
if (!layer.tool_changes.empty() && last_layer_finish_block && last_layer_finish_block->block_id == block.block_id && finish_layer_filament == -1) {
|
WipeTowerBlock * last_layer_finish_block = get_block_by_category(get_filament_category(layer.tool_changes.front().old_tool), false);
|
||||||
finish_layer_filament = layer.tool_changes.front().old_tool;
|
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) {
|
if (finish_layer_filament == -1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user