From fc3a73afe85669bdaa094be27c53495d418a8deb Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci <aar@cpan.org> Date: Fri, 2 May 2014 13:13:13 +0200 Subject: [PATCH] Make OpenGL::Array thread-safe, thus fixing the crash after the cut dialog is closed in threaded perl --- lib/Slic3r/GUI/PreviewCanvas.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Slic3r/GUI/PreviewCanvas.pm b/lib/Slic3r/GUI/PreviewCanvas.pm index 29a5509fc..d6d61de2f 100644 --- a/lib/Slic3r/GUI/PreviewCanvas.pm +++ b/lib/Slic3r/GUI/PreviewCanvas.pm @@ -23,6 +23,9 @@ use constant TURNTABLE_MODE => 1; use constant SELECTED_COLOR => [0,1,0,1]; use constant COLORS => [ [1,1,1], [1,0.5,0.5], [0.5,1,0.5], [0.5,0.5,1] ]; +# make OpenGL::Array thread-safe +*OpenGL::Array::CLONE_SKIP = sub { 1 }; + sub new { my ($class, $parent, $object) = @_; my $self = $class->SUPER::new($parent);