diff --git a/lib/Slic3r/GCode.pm b/lib/Slic3r/GCode.pm index e99f35542b..054b7db305 100644 --- a/lib/Slic3r/GCode.pm +++ b/lib/Slic3r/GCode.pm @@ -322,7 +322,7 @@ sub extrude_path { my $path_length = 0; { my $local_F = $F; - foreach my $line ($path->lines) { + foreach my $line (@{$path->lines}) { $path_length += my $line_length = unscale $line->length; # calculate extrusion length for this line