first merge
[sdlgit/SDL_perl.git] / lib / SDL / Rect.pm
index 298c03e..d1d201b 100644 (file)
@@ -46,9 +46,9 @@ sub new {
        my $y = $options{-y}            || 0;
        my $w = $options{-width}        || $options{-w}         || 0;
        my $h = $options{-height}       || $options{-h}         || 0;
-       die SDL::GetError() unless $$self;
        
        my $self = \SDL::NewRect($x,$y,$w,$h);
+       croak SDL::GetError() unless $$self;
        bless $self,$class;
        return $self;
 }