diff --git a/stepmania/src/SDL_utils.cpp b/stepmania/src/SDL_utils.cpp index 25297789ba..cc7a4f7c03 100644 --- a/stepmania/src/SDL_utils.cpp +++ b/stepmania/src/SDL_utils.cpp @@ -272,8 +272,13 @@ SDL_Surface *SDL_CreateRGBSurfaceSane Amask = SDL_SwapLE32(Amask); } - return SDL_CreateRGBSurface(flags, width, height, depth, + SDL_Surface *ret = SDL_CreateRGBSurface(flags, width, height, depth, Rmask, Gmask, Bmask, Amask); + if(ret == NULL) + RageException::Throw("SDL_CreateRGBSurface(%i, %i, %i, %i, %8x, %8x, %8x, %8x) failed: %s", + flags, width, height, depth, Rmask, Gmask, Bmask, Amask, SDL_GetError()); + + return ret; } static void FindAlphaRGB(const SDL_Surface *img, Uint8 &r, Uint8 &g, Uint8 &b, bool reverse)