G-code: no crossing-perimeter avoidance while travelling on a brim apron layer

Crossing-perimeter avoidance dereferenced the (null) layer while travelling on a brim
apron layer.
This commit is contained in:
harrierpigeon
2026-10-02 01:00:36 -05:00
parent d755580c99
commit b8a8e38ceb
+1
View File
@@ -9427,6 +9427,7 @@ std::string GCode::travel_to(const Point& point, ExtrusionRole role, std::string
// multi-hop travel path inside the configuration space
if (m_config.reduce_crossing_wall
&& !m_avoid_crossing_perimeters.disabled_once()
&& m_layer != nullptr // A brim apron layer has no Layer to avoid crossing
&& m_writer->is_current_position_clear())
//BBS: don't generate detour travel paths when current position is unclea
{