mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-09 18:45:35 +00:00
Added surface validation to SDL_DuplicateSurface()
(cherry picked from commit 73b13728de)
This commit is contained in:
@@ -2211,6 +2211,11 @@ SDL_Surface *SDL_RotateSurface(SDL_Surface *surface, float angle)
|
||||
|
||||
SDL_Surface *SDL_DuplicateSurface(SDL_Surface *surface)
|
||||
{
|
||||
CHECK_PARAM(!SDL_SurfaceValid(surface)) {
|
||||
SDL_InvalidParamError("surface");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return SDL_ConvertSurfaceAndColorspace(surface, surface->format, surface->palette, surface->colorspace, surface->props);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user