From 71d6f428ca3d1ceda95bb100fbe07338458aff09 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Mon, 20 May 2013 10:57:27 +0200 Subject: [PATCH] Apparent fix for "Attempt to free unreferenced scalar" --- lib/Slic3r/GUI/Plater.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index 933dbcb20..e70414a3c 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -544,6 +544,11 @@ sub export_gcode { } $self->statusbar->StartBusy; + + # It looks like declaring a local $SIG{__WARN__} prevents the ugly + # "Attempt to free unreferenced scalar" warning... + local $SIG{__WARN__} = Slic3r::GUI::warning_catcher($self); + if ($Slic3r::have_threads) { @_ = (); $self->{export_thread} = threads->create(sub {