diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 5f8e5df2b5..ff7b341807 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -2641,7 +2641,9 @@ void GCodeGenerator::set_origin(const Vec2d &pointf) { // if origin increases (goes towards right), last_pos decreases because it goes towards left const auto offset = Point::new_scale(m_origin - pointf); - *(this->last_position) += offset; + if (last_position.has_value()) + *(this->last_position) += offset; + m_wipe.offset_path(offset); m_origin = pointf; }