Skip to content

Commit

Permalink
Bugfix: don't crash when skirts > 0 but skirt_height = 0. Includes re…
Browse files Browse the repository at this point in the history
…gression test. #2537
  • Loading branch information
alranel committed Jan 18, 2015
1 parent 9f0283f commit 90afbc8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Slic3r/Print.pm
Expand Up @@ -203,7 +203,7 @@ sub make_skirt {
# checking whether we need to generate them
$self->skirt->clear;

if ($self->config->skirts == 0
if (($self->config->skirts == 0 || $self->config->skirt_height == 0)
&& (!$self->config->ooze_prevention || @{$self->extruders} == 1)) {
$self->set_step_done(STEP_SKIRT);
return;
Expand Down
11 changes: 10 additions & 1 deletion t/skirt_brim.t
@@ -1,4 +1,4 @@
use Test::More tests => 5;
use Test::More tests => 6;
use strict;
use warnings;

Expand Down Expand Up @@ -79,6 +79,15 @@ use Slic3r::Test;
ok Slic3r::Test::gcode($print), 'successful G-code generation when skirt is smaller than brim width';
}

{
my $config = Slic3r::Config->new_from_defaults;
$config->set('skirts', 1);
$config->set('skirt_height', 0);

my $print = Slic3r::Test::init_print('20mm_cube', config => $config);
ok Slic3r::Test::gcode($print), 'successful G-code generation when skirt_height = 0 and skirts > 0';
}

{
my $config = Slic3r::Config->new_from_defaults;
$config->set('layer_height', 0.4);
Expand Down

0 comments on commit 90afbc8

Please sign in to comment.