Workaround for a perl 5.10 bug about leaked scalars. #503

This commit is contained in:
Alessandro Ranellucci 2012-07-21 14:45:45 +02:00
parent f899deb6b6
commit c7bc9bed46

View file

@ -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;