Diffstat (limited to 'noncore/games/sfcave-sdl/animatedimage.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/games/sfcave-sdl/animatedimage.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/games/sfcave-sdl/animatedimage.cpp b/noncore/games/sfcave-sdl/animatedimage.cpp index d9d6ff6..441c647 100644 --- a/noncore/games/sfcave-sdl/animatedimage.cpp +++ b/noncore/games/sfcave-sdl/animatedimage.cpp @@ -6,3 +6,3 @@ -AnimatedImage :: AnimatedImage( QString file, int nFrames ) +AnimatedImage :: AnimatedImage( string file, int nFrames ) { @@ -21,5 +21,2 @@ AnimatedImage :: AnimatedImage( QString file, int nFrames ) SDL_SetColorKey(image, SDL_SRCCOLORKEY | SDL_RLEACCEL, SDL_MapRGB( image->format, 0, 0, 0 ) ); -// image = SDL_DisplayFormat( tmp ); - -// SDL_FreeSurface( tmp ); frameWidth = image->w/nrFrames; @@ -49,2 +46,5 @@ void AnimatedImage :: draw( SDL_Surface *screen, int x, int y ) { + if ( !image ) + return; + SDL_Rect dst; |