Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Check the parameters to SDL_UpdateTexture()

  • Loading branch information
slouken committed Jul 12, 2013
1 parent c794628 commit d2d1ada7d539baf5c46e3359bc623eb8606fffd2
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/render/SDL_render.c
@@ -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;

0 comments on commit d2d1ada

Please sign in to comment.