More fixes and error reporting
Kartik Thakore [Sat, 15 Aug 2009 19:27:41 +0000 (15:27 -0400)]
lib/SDL/Surface.pm

index 7075482..49a2b29 100644 (file)
@@ -203,6 +203,7 @@ sub flip {
 
 sub blit {
        if ($SDL::DEBUG) {
+               croak "SDL::Surface::blit does not accept undef use SDL::NULL" if ( !defined($_[1]) || !defined($_[3]) );
                croak "SDL::Surface::blit requires SDL::Rect objects"
                        unless ($_[1] == 0 || $_[1]->isa('SDL::Rect'))
                        && ($_[3] == 0 || $_[3]->isa('SDL::Rect'));