Permalink
Browse files

fix error handling in the bounding_box() wrapper method

  • Loading branch information...
1 parent b3f71a5 commit 19e0b86f87245e1367443c09271f8377422bffcb @tonycoz committed Feb 22, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/Imager/Font.pm
View
@@ -4,7 +4,7 @@ use Imager::Color;
use strict;
use vars qw($VERSION);
-$VERSION = "1.035";
+$VERSION = "1.036";
# the aim here is that we can:
# - add file based types in one place: here
@@ -249,7 +249,8 @@ sub bounding_box {
$input{sizew} = _first($input{sizew}, $self->{sizew}, 0);
$input{utf8} = _first($input{utf8}, $self->{utf8}, 0);
- my @box = $self->_bounding_box(%input);
+ my @box = $self->_bounding_box(%input)
+ or return;
if (wantarray) {
if(@box && exists $input{'x'} and exists $input{'y'}) {

0 comments on commit 19e0b86

Please sign in to comment.