changeset 4433 | 9fa97c6b0014 |
parent 3701 | fb905d5674cc |
child 4472 | 791b3256fb22 |
child 4701 | d40bb3165d2b |
child 4772 | 37e9f8154ac4 |
--- a/src/video/SDL_video.c Tue Apr 13 22:01:14 2010 -0700 +++ b/src/video/SDL_video.c Thu Apr 15 21:27:32 2010 -0700 @@ -1649,6 +1649,10 @@ SDL_Unsupported(); return 0; } + if (w <= 0 || h <= 0) { + SDL_SetError("Texture dimensions can't be 0"); + return 0; + } texture = (SDL_Texture *) SDL_calloc(1, sizeof(*texture)); if (!texture) { SDL_OutOfMemory();