|
@@ -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");
|