src/video/SDL_fillrect.c
changeset 9374 b577c4753421
parent 8641 c576c104923b
child 9619 b94b6d0bff0f
equal deleted inserted replaced
9373:679eb3986e37 9374:b577c4753421
   249             return 0;
   249             return 0;
   250         }
   250         }
   251         rect = &clipped;
   251         rect = &clipped;
   252     } else {
   252     } else {
   253         rect = &dst->clip_rect;
   253         rect = &dst->clip_rect;
       
   254         /* Don't attempt to fill if the surface's clip_rect is empty */
       
   255         if (SDL_RectEmpty(rect)) {
       
   256             return 0;
       
   257         }
   254     }
   258     }
   255 
   259 
   256     /* Perform software fill */
   260     /* Perform software fill */
   257     if (!dst->pixels) {
   261     if (!dst->pixels) {
   258         return SDL_SetError("SDL_FillRect(): You must lock the surface");
   262         return SDL_SetError("SDL_FillRect(): You must lock the surface");