diff --git a/src/video/SDL_surface.c b/src/video/SDL_surface.c index 9f1a2a161..89ba68bc7 100644 --- a/src/video/SDL_surface.c +++ b/src/video/SDL_surface.c @@ -1298,7 +1298,7 @@ SDL_ConvertSurface(SDL_Surface * surface, const SDL_PixelFormat * format, /* Enable alpha blending by default if the new surface has an * alpha channel or alpha modulation */ - if ((surface->format->Amask && format->Amask) || + if ((convert->format->Amask && format->Amask) || (palette_has_alpha && format->Amask) || (copy_flags & SDL_COPY_MODULATE_ALPHA)) { SDL_SetSurfaceBlendMode(convert, SDL_BLENDMODE_BLEND);