From: Tony Cook Date: Mon, 12 Nov 2012 10:09:09 +0000 (+1100) Subject: check for the remnant from thread creation in _valid_image X-Git-Tag: v0.94~2^2~4 X-Git-Url: http://git.imager.perl.org/imager.git/commitdiff_plain/82a4a788ab37750cf112f0d6655b99ec09738232 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) --- 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);