mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 14:43:20 +00:00
Added surface validation to SDL_ConvertSurfaceRect()
Fixes https://github.com/libsdl-org/SDL/issues/15141
This commit is contained in:
parent
abeb392959
commit
2d9fca46c6
1 changed files with 5 additions and 0 deletions
|
|
@ -2311,6 +2311,11 @@ error:
|
|||
|
||||
SDL_Surface *SDL_ConvertSurfaceRect(SDL_Surface *surface, const SDL_Rect *rect, SDL_PixelFormat format)
|
||||
{
|
||||
CHECK_PARAM(!SDL_SurfaceValid(surface)) {
|
||||
SDL_InvalidParamError("surface");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return SDL_ConvertSurfaceRectAndColorspace(surface, NULL, format, NULL, SDL_GetDefaultColorspaceForFormat(format), surface->props);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue