Skip to content

Commit 04e98d2

Browse files
committed
Added missing calls to SDL_InvalidParamError("surface")
1 parent 521bbcc commit 04e98d2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/video/SDL_surface.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ int SDL_SetSurfaceRLE(SDL_Surface *surface, int flag)
285285
int flags;
286286

287287
if (surface == NULL) {
288-
return -1;
288+
return SDL_InvalidParamError("surface");
289289
}
290290

291291
flags = surface->map->info.flags;
@@ -468,7 +468,7 @@ int SDL_SetSurfaceColorMod(SDL_Surface *surface, Uint8 r, Uint8 g, Uint8 b)
468468
int flags;
469469

470470
if (surface == NULL) {
471-
return -1;
471+
return SDL_InvalidParamError("surface");
472472
}
473473

474474
surface->map->info.r = r;
@@ -490,7 +490,7 @@ int SDL_SetSurfaceColorMod(SDL_Surface *surface, Uint8 r, Uint8 g, Uint8 b)
490490
int SDL_GetSurfaceColorMod(SDL_Surface *surface, Uint8 *r, Uint8 *g, Uint8 *b)
491491
{
492492
if (surface == NULL) {
493-
return -1;
493+
return SDL_InvalidParamError("surface");
494494
}
495495

496496
if (r) {
@@ -510,7 +510,7 @@ int SDL_SetSurfaceAlphaMod(SDL_Surface *surface, Uint8 alpha)
510510
int flags;
511511

512512
if (surface == NULL) {
513-
return -1;
513+
return SDL_InvalidParamError("surface");
514514
}
515515

516516
surface->map->info.a = alpha;
@@ -530,7 +530,7 @@ int SDL_SetSurfaceAlphaMod(SDL_Surface *surface, Uint8 alpha)
530530
int SDL_GetSurfaceAlphaMod(SDL_Surface *surface, Uint8 *alpha)
531531
{
532532
if (surface == NULL) {
533-
return -1;
533+
return SDL_InvalidParamError("surface");
534534
}
535535

536536
if (alpha) {
@@ -544,7 +544,7 @@ int SDL_SetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode blendMode)
544544
int flags, status;
545545

546546
if (surface == NULL) {
547-
return -1;
547+
return SDL_InvalidParamError("surface");
548548
}
549549

550550
status = 0;
@@ -581,7 +581,7 @@ int SDL_SetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode blendMode)
581581
int SDL_GetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode *blendMode)
582582
{
583583
if (surface == NULL) {
584-
return -1;
584+
return SDL_InvalidParamError("surface");
585585
}
586586

587587
if (blendMode == NULL) {

0 commit comments

Comments
 (0)