src/video/SDL_fillrect.c
changeset 5297 1800dc39b74c
parent 5262 b530ef003506
child 5535 96594ac5fd1a
     1.1 --- a/src/video/SDL_fillrect.c	Mon Feb 14 11:50:18 2011 -0600
     1.2 +++ b/src/video/SDL_fillrect.c	Tue Feb 15 13:59:59 2011 -0800
     1.3 @@ -417,14 +417,19 @@
     1.4  }
     1.5  
     1.6  int
     1.7 -SDL_FillRects(SDL_Surface * dst, const SDL_Rect ** rects, int count,
     1.8 +SDL_FillRects(SDL_Surface * dst, const SDL_Rect * rects, int count,
     1.9                Uint32 color)
    1.10  {
    1.11      int i;
    1.12      int status = 0;
    1.13  
    1.14 +    if (!rects) {
    1.15 +        SDL_SetError("SDL_FillRects() passed NULL rects");
    1.16 +        return -1;
    1.17 +    }
    1.18 +
    1.19      for (i = 0; i < count; ++i) {
    1.20 -        status = SDL_FillRect(dst, rects[i], color);
    1.21 +        status += SDL_FillRect(dst, &rects[i], color);
    1.22      }
    1.23      return status;
    1.24  }