From c7bc9bed4640b36940040cc50c1e2e17fc740c3b Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sat, 21 Jul 2012 14:45:45 +0200 Subject: [PATCH] Workaround for a perl 5.10 bug about leaked scalars. #503 --- lib/Slic3r/GUI/Plater.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index efdb95bb3f..97c76c6f4a 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -865,6 +865,10 @@ sub OnDropFiles { my $self = shift; my ($x, $y, $filenames) = @_; + # stop scalars leaking on older perl + # https://rt.perl.org/rt3/Public/Bug/Display.html?id=70602 + @_ = (); + # only accept STL and AMF files return 0 if grep !/\.(?:stl|amf(?:\.xml)?)$/i, @$filenames;