first merge
[sdlgit/SDL_perl.git] / lib / SDL / Cursor.pm
index a8aee2a..d434e83 100644 (file)
@@ -40,9 +40,10 @@ sub new {
 
        verify (%options, qw/ -data -mask -x -y /) if $SDL::DEBUG;
 
-       die SDL::GetError() unless $$self;
+       
        my $self = \SDL::NewCursor($options{-data},$options{-mask},
                                $options{-x},$options{-y});
+       croak SDL::GetError() unless $$self;
        bless $self, $class;
        $self;
 }