summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2013-07-30 20:57:26 -0700
committerSam Lantinga <slouken@libsdl.org>2013-07-30 20:57:26 -0700
commit94c6b39a045e55028e44d34bf0a2ce77652edb5f (patch)
treee80889317d428bdeacc1351409947aab2f9744f3
parent0f4de9839062821288264f667767fdaf8031ccdc (diff)
Check for negative source rectangle in SDL_SoftBlit() (thanks John!)
-rw-r--r--src/video/SDL_blit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video/SDL_blit.c b/src/video/SDL_blit.c
index 78e449dd01..7b4f9edc9b 100644
--- a/src/video/SDL_blit.c
+++ b/src/video/SDL_blit.c
@@ -61,7 +61,7 @@ SDL_SoftBlit(SDL_Surface * src, SDL_Rect * srcrect,
}
/* Set up source and destination buffer pointers, and BLIT! */
- if (okay && srcrect->w && srcrect->h) {
+ if (okay && !SDL_RectEmpty(srcrect)) {
SDL_BlitFunc RunBlit;
SDL_BlitInfo *info = &src->map->info;