From 82a4a788ab37750cf112f0d6655b99ec09738232 Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Mon, 12 Nov 2012 21:09:09 +1100 Subject: [PATCH] check for the remnant from thread creation in _valid_image CLONE_SKIP simply unblesses the thingy on thread creation, so for the image to be valid the IMG entry needs to be blessed (as well as true) --- Imager.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Imager.pm b/Imager.pm index ab0ae833..85f04ed2 100644 --- a/Imager.pm +++ b/Imager.pm @@ -619,9 +619,9 @@ sub _combine { sub _valid_image { my ($self, $method) = @_; - $self->{IMG} and return 1; + $self->{IMG} && Scalar::Util::blessed($self->{IMG}) and return 1; - my $msg = 'empty input image'; + my $msg = $self->{IMG} ? "images do not cross threads" : "empty input image"; $msg = "$method: $msg" if $method; $self->_set_error($msg); -- 2.39.5