mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-11 03:25:36 +00:00
Added surface validation to SDL_ConvertSurfaceRect()
Fixes https://github.com/libsdl-org/SDL/issues/15141
(cherry picked from commit 2d9fca46c6)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user