diff --git a/src/video/SDL_surface.c b/src/video/SDL_surface.c index 2e114284a..f94491415 100644 --- a/src/video/SDL_surface.c +++ b/src/video/SDL_surface.c @@ -296,11 +296,11 @@ int SDL_GetColorKey(SDL_Surface * surface, Uint32 * key) { if (!surface) { - return -1; + return SDL_InvalidParamError("surface"); } if (!(surface->map->info.flags & SDL_COPY_COLORKEY)) { - return -1; + return SDL_SetError("Surface doesn't have a colorkey"); } if (key) {