mirror of https://github.com/libsdl-org/SDL.git
SDL_BlitSurfaceScaled(): Do not blit if surfaces have no pixel data
This commit is contained in:
parent
18fbe6a92f
commit
8017d38adc
|
|
@ -1101,9 +1101,9 @@ bool SDL_BlitSurfaceScaled(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surfac
|
|||
int dst_w, dst_h;
|
||||
|
||||
// Make sure the surfaces aren't locked
|
||||
if (!SDL_SurfaceValid(src)) {
|
||||
if (!SDL_SurfaceValid(src) || !src->pixels) {
|
||||
return SDL_InvalidParamError("src");
|
||||
} else if (!SDL_SurfaceValid(dst)) {
|
||||
} else if (!SDL_SurfaceValid(dst) || !dst->pixels) {
|
||||
return SDL_InvalidParamError("dst");
|
||||
} else if ((src->flags & SDL_SURFACE_LOCKED) || (dst->flags & SDL_SURFACE_LOCKED)) {
|
||||
return SDL_SetError("Surfaces must not be locked during blit");
|
||||
|
|
|
|||
Loading…
Reference in New Issue