From 212bf21b2d17150e7ce0dc1229e44c43f6c125c4 Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Tue, 29 Aug 2023 10:56:54 +0200 Subject: [PATCH] Fix of SPE-1849, GH #11174: Access violation error when slicing Fixed access of an undefined extruder at the start of G-code export from wipe tower generator. --- src/libslic3r/GCode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 444fe95e25..bf96a035d0 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -3256,7 +3256,7 @@ std::string GCode::travel_to(const Point &point, ExtrusionRole role, std::string bool GCode::needs_retraction(const Polyline &travel, ExtrusionRole role) { - if (travel.length() < scale_(EXTRUDER_CONFIG(retract_before_travel))) { + if (! m_writer.extruder() || travel.length() < scale_(EXTRUDER_CONFIG(retract_before_travel))) { // skip retraction if the move is shorter than the configured threshold return false; }