diff --git a/test/common.c b/test/common.c index 311b93dd0..0d8f98fc9 100644 --- a/test/common.c +++ b/test/common.c @@ -546,15 +546,11 @@ LoadIcon(const char *file) return (NULL); } - if (icon->format->palette == NULL) { - fprintf(stderr, "Icon must have a palette!\n"); - SDL_FreeSurface(icon); - return (NULL); + if (icon->format->palette) { + /* Set the colorkey */ + SDL_SetColorKey(icon, 1, *((Uint8 *) icon->pixels)); } - /* Set the colorkey */ - SDL_SetColorKey(icon, 1, *((Uint8 *) icon->pixels)); - return (icon); }