Check the parameters to SDL_UpdateTexture()
This commit is contained in:
parent
b5145bcf7f
commit
22b55373e7
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue