diff --git a/lib/Slic3r/GUI/3DScene.pm b/lib/Slic3r/GUI/3DScene.pm index 352a61264..1b6adf800 100644 --- a/lib/Slic3r/GUI/3DScene.pm +++ b/lib/Slic3r/GUI/3DScene.pm @@ -908,6 +908,9 @@ sub deselect_volumes { sub select_volume { my ($self, $volume_idx) = @_; + + return if ($volume_idx >= scalar(@{$self->volumes})); + $self->volumes->[$volume_idx]->set_selected(1) if $volume_idx != -1; }