Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Check the parameters to SDL_UpdateTexture()
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jul 12, 2013
1 parent c794628 commit d2d1ada
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/render/SDL_render.c
Expand Up @@ -764,6 +764,13 @@ SDL_UpdateTexture(SDL_Texture * texture, const SDL_Rect * rect,

CHECK_TEXTURE_MAGIC(texture, -1);

if (!pixels) {
return SDL_InvalidParamError("pixels");
}
if (!pitch) {
return SDL_InvalidParamError("pitch");
}

if (!rect) {
full_rect.x = 0;
full_rect.y = 0;
Expand Down

0 comments on commit d2d1ada

Please sign in to comment.