|
@@ -530,7 +530,6 @@ SDL_AllocFormat(Uint32 pixel_format)
|
|
|
if (SDL_InitFormat(format, pixel_format) < 0) {
|
|
|
SDL_AtomicUnlock(&formats_lock);
|
|
|
SDL_free(format);
|
|
|
- SDL_InvalidParamError("format");
|
|
|
return NULL;
|
|
|
}
|
|
|
|
|
@@ -671,6 +670,7 @@ SDL_AllocPalette(int ncolors)
|
|
|
(SDL_Color *) SDL_malloc(ncolors * sizeof(*palette->colors));
|
|
|
if (!palette->colors) {
|
|
|
SDL_free(palette);
|
|
|
+ SDL_OutOfMemory();
|
|
|
return NULL;
|
|
|
}
|
|
|
palette->ncolors = ncolors;
|