diff options
-rw-r--r-- | src/video/SDL_fillrect.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/video/SDL_fillrect.c b/src/video/SDL_fillrect.c index 5f343eaf2..84707842e 100644 --- a/src/video/SDL_fillrect.c +++ b/src/video/SDL_fillrect.c @@ -251,6 +251,10 @@ SDL_FillRect(SDL_Surface * dst, const SDL_Rect * rect, Uint32 color) rect = &clipped; } else { rect = &dst->clip_rect; + /* Don't attempt to fill if the surface's clip_rect is empty */ + if (SDL_RectEmpty(rect)) { + return 0; + } } /* Perform software fill */ |